File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 44 push :
55 workflow_dispatch :
66
7+ env :
8+ BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
9+
710jobs :
811 publish-snapshot :
912 runs-on : ubuntu-24.04
3033 - name : Generate snapshot version
3134 id : version
3235 run : |
33- BRANCH_NAME="${{ github.head_ref || github.ref_name }}"
3436 COMMIT_HASH=$(git rev-parse --short ${{ github.sha }})
35- SNAPSHOT_VERSION="${BRANCH_NAME}+${COMMIT_HASH}"
37+ # Replace slashes in branch name with dashes for proper versioning
38+ SNAPSHOT_VERSION="${BRANCH_NAME//\//-}+${COMMIT_HASH}"
3639 echo "snapshot_version=${SNAPSHOT_VERSION}" >> $GITHUB_OUTPUT
3740 echo "Generated snapshot version: ${SNAPSHOT_VERSION}"
3841 echo "::notice title=Snapshot Version::${SNAPSHOT_VERSION}"
4750 run : |
4851 echo "## 📦 Snapshot Published" >> $GITHUB_STEP_SUMMARY
4952 echo "**Version:** \`${{ steps.version.outputs.snapshot_version }}\`" >> $GITHUB_STEP_SUMMARY
50- echo "**Branch:** \`${{ github.ref_name } }\`" >> $GITHUB_STEP_SUMMARY
53+ echo "**Branch:** \`${BRANCH_NAME }\`" >> $GITHUB_STEP_SUMMARY
5154 echo "**Commit:** \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY
5255 echo "**Repository:** GitHub Packages" >> $GITHUB_STEP_SUMMARY
You can’t perform that action at this time.
0 commit comments