We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 434d6cd commit 71e6bdcCopy full SHA for 71e6bdc
.github/workflows/publish-snapshot.yml
@@ -2,8 +2,6 @@ name: Publish to GitHub packages
2
3
on:
4
push:
5
- branches:
6
- - neo
7
workflow_dispatch:
8
9
jobs:
@@ -32,9 +30,9 @@ jobs:
32
30
- name: Generate snapshot version
33
31
id: version
34
run: |
35
- DATE=$(date +'%Y%m%d')
36
- COMMIT_HASH=$(git rev-parse --short HEAD)
37
- SNAPSHOT_VERSION="${DATE}+${COMMIT_HASH}"
+ BRANCH_NAME="${{ github.head_ref || github.ref_name }}"
+ COMMIT_HASH=$(git rev-parse --short ${{ github.sha }})
+ SNAPSHOT_VERSION="${BRANCH_NAME}+${COMMIT_HASH}"
38
echo "snapshot_version=${SNAPSHOT_VERSION}" >> $GITHUB_OUTPUT
39
echo "Generated snapshot version: ${SNAPSHOT_VERSION}"
40
echo "::notice title=Snapshot Version::${SNAPSHOT_VERSION}"
0 commit comments