Skip to content

Commit 4fc5ec3

Browse files
authored
automatically create bzlmod archive for release (#1230)
1 parent 8106fcf commit 4fc5ec3

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Bazel Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
# A release archive is required for bzlmod
9+
# See: https://blog.bazel.build/2023/02/15/github-archive-checksum.html
10+
bazel-release-archive:
11+
runs-on: ubuntu-latest
12+
continue-on-error: true
13+
permissions:
14+
contents: write
15+
steps:
16+
- uses: actions/checkout@v3
17+
- run: git archive $GITHUB_REF -o "yaml-cpp-${GITHUB_REF:10}.tar.gz"
18+
- run: gh release upload ${GITHUB_REF:10} "yaml-cpp-${GITHUB_REF:10}.tar.gz"
19+
env:
20+
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)