Skip to content

Commit

Permalink
Automate publishing of binaries (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtomlinson authored Mar 16, 2022
1 parent 4f75dfe commit a2bd379
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/upload-release-assets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
release:
types:
- published

name: Upload Release Assets

jobs:
build:
name: Upload Release Assets
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: "1.17.x"
- name: Build binaries
run: |
make package
- name: Calculate hashes
run: |
cd bin
for f in canary_*; do
shasum -a 256 "$f" > "$f".sha256sum;
done
- name: Upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag_name="${GITHUB_REF##*/}"
hub release edit $(find . -type f -name "bin/canary_*" -printf "-a %p ") -m "" "$tag_name"

0 comments on commit a2bd379

Please sign in to comment.