forked from bpftrace/bpftrace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Build and upload release artifacts on release
This frees maintainers from having to manually build + upload artfacts. It also pins the tools used to build man pages and whatnot to the versions defined in `flake.nix`. This helps with reproducibility. This closes bpftrace#2609.
- Loading branch information
Showing
2 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This job listens for new releases and will build the appropriate artifacts | ||
# and upload them to the release. | ||
|
||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build-upload: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: DeterminateSystems/nix-installer-action@v4 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v2 | ||
|
||
- name: Build artifacts | ||
run: nix develop --command bash -c "OUT=./assets ./scripts/create-assets.sh" | ||
|
||
- name: Upload artifacts | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: gh release upload ${{ github.ref_name }} ./assets/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters