Skip to content

Commit 8d155ec

Browse files
committed
try passing ref as arg to script
1 parent ca0cffc commit 8d155ec

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

.github/workflows/create_archive_and_notes.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,16 @@ if grep --exclude=CONTRIBUTING.md --exclude=RELEASING.md --exclude-dir=.* VERSIO
2727
#exit 1
2828
fi
2929

30-
# Set by GH actions, see
31-
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
30+
TAG=$1
3231
if [ -z "$TAG" ]; then
3332
echo "ERROR: TAG env var must be set"
3433
exit 1
3534
fi
3635
# A prefix is added to better match the GitHub generated archives.
3736
PREFIX="rules_python-${TAG}"
3837
ARCHIVE="rules_python-$TAG.tar.gz"
39-
git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE
40-
SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}')
38+
git archive --format=tar "--prefix=${PREFIX}/" "$TAG" | gzip > "$ARCHIVE"
39+
SHA=$(shasum -a 256 "$ARCHIVE" | awk '{print $1}')
4140

4241
cat > release_notes.txt << EOF
4342

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ jobs:
4343
with:
4444
ref: ${{ inputs.tag_name || github.ref_name }}
4545
- name: Create release archive and notes
46-
env:
47-
TAG: ${{ inputs.tag_name || github.ref_name }}
48-
run: .github/workflows/create_archive_and_notes.sh
46+
run: .github/workflows/create_archive_and_notes.sh ${{ inputs.tag_name || github.ref_name }}
4947
- name: Release
5048
uses: softprops/action-gh-release@v2
5149
with:

0 commit comments

Comments
 (0)