Skip to content

Commit

Permalink
automatically create bzlmod archive for release (#1230)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy committed Oct 12, 2023
1 parent 8106fcf commit 4fc5ec3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/bzlmod-archive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Bazel Release

on:
release:
types: [published]

jobs:
# A release archive is required for bzlmod
# See: https://blog.bazel.build/2023/02/15/github-archive-checksum.html
bazel-release-archive:
runs-on: ubuntu-latest
continue-on-error: true
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- run: git archive $GITHUB_REF -o "yaml-cpp-${GITHUB_REF:10}.tar.gz"
- run: gh release upload ${GITHUB_REF:10} "yaml-cpp-${GITHUB_REF:10}.tar.gz"
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit 4fc5ec3

Please sign in to comment.