Skip to content

Commit 14e101f

Browse files
committed
Fix workflow
1 parent 1d4357f commit 14e101f

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,23 @@ jobs:
3131
- name: Create JAR of repository
3232
run: |
3333
set -euo pipefail
34-
35-
SHORT_SHA="${GITHUB_SHA:0:7}"
3634
JAR_NAME="repo-${SHORT_SHA}.jar"
3735
36+
# Build JAR safely, handling spaces in filenames
3837
find . -type f \
3938
! -path "./.git/*" \
4039
! -name "$JAR_NAME" \
41-
-print | sed 's|^\./||' > filelist.txt
42-
43-
jar cf "$JAR_NAME" -C . -@ < filelist.txt
40+
-print0 | xargs -0 jar cf "$JAR_NAME"
4441
4542
echo "ZIP_NAME=$JAR_NAME" >> $GITHUB_ENV
4643
4744
- name: Create GitHub release and attach JAR
4845
env:
4946
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5047
ZIP_NAME: ${{ env.ZIP_NAME }}
48+
TAG: ${{ env.INJECTED_VERSION }}
5149
run: |
5250
set -euo pipefail
53-
54-
SHORT_SHA="${GITHUB_SHA:0:7}"
55-
TAG="v-$(date -u +%Y%m%d%H%M%S)-${SHORT_SHA}"
5651
TITLE="Automated release ${TAG}"
5752
NOTES="Automated release for commit ${GITHUB_SHA} on branch ${GITHUB_REF#refs/heads/}"
5853

0 commit comments

Comments
 (0)