automatically create bzlmod archive for release

This commit is contained in:
Ezekiel Warren 2023-10-01 12:22:18 -07:00
parent 37f1b8b8c9
commit cd01ce96f5
No known key found for this signature in database
GPG Key ID: C7D39B2B03B85E8D

20
.github/workflows/bzlmod-archive.yml vendored Normal file
View File

@ -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 }}