From cd01ce96f572dd38768038b72cb97c4ebefdd772 Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Sun, 1 Oct 2023 12:22:18 -0700 Subject: [PATCH] automatically create bzlmod archive for release --- .github/workflows/bzlmod-archive.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/bzlmod-archive.yml diff --git a/.github/workflows/bzlmod-archive.yml b/.github/workflows/bzlmod-archive.yml new file mode 100644 index 000000000..cf999f3ad --- /dev/null +++ b/.github/workflows/bzlmod-archive.yml @@ -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 }}