Skip to content

Commit

Permalink
Fix release archive script again.
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzojive committed Sep 28, 2024
1 parent 1a562ce commit 42479c7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/release-source-archive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ jobs:
contents: write
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
# GITHUB_REF: "For workflows triggered by release, this is the release tag created."
# GITHUB_REF is defined here:
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables
- run: git archive $GITHUB_REF -o "grpc-web-source-${TAG}.tar.gz"
- run: gh release upload ${TAG} "grpc-web-source-${TAG}.tar.gz"
- run: git archive --format zip --prefix "grpc-web-$TAG/" --output "grpc-web-source-${TAG}.zip" "$GITHUB_REF"
- run: git archive --format tar.gz --prefix "grpc-web-$TAG/" --output "grpc-web-source-${TAG}.tar.gz" "$GITHUB_REF"
- run: gh release upload "${TAG}"" "grpc-web-source-${TAG}.zip" "grpc-web-source-${TAG}.tar.gz"
env:
GH_TOKEN: ${{ github.token }}
# github.ref_name is defined here:
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context
TAG: ${{github.ref_name}}

0 comments on commit 42479c7

Please sign in to comment.