diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000000..01634632bd95 --- /dev/null +++ b/.github/workflows/release.yml @@ -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/* diff --git a/docs/release_process.md b/docs/release_process.md index 1684282a64a1..592b4fe4d71d 100644 --- a/docs/release_process.md +++ b/docs/release_process.md @@ -42,5 +42,8 @@ You must do these things to formally release a version: as "commits"), then "Draft a new release". The tag version and release title should be the same and in `vX.Y.Z` format. The tag description should be the same as what you added to `CHANGELOG.md`. -1. Run `scripts/create-assets.sh` from bpftrace root dir and attach the - generated archives to the release. +1. Check that automation picks up the new release and uploads release assets + to the release. +1. If automation fails, please fix the automation for next time and also manually + build+upload artifacts by running `scripts/create-assets.sh` from bpftrace root + dir and attach the generated archives to the release.