File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed
Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 1212 steps :
1313 - name : Get release version
1414 run : |
15- # Extract version from the release tag (remove 'v' from v1.0.2 to 1.0.2)
16- VERSION=$(echo "${{ github.event.release.tag_name }}" | sed 's/^v//')
15+ # Extract tag
16+ TAG_NAME="${{ github.event.release.tag_name }}"
17+ if [ -z "$TAG_NAME" ]; then
18+ TAG_NAME=$(git fetch --tags && git describe --tags $(git rev-list --tags --max-count=1))
19+ fi
20+
21+ # Remove 'v' before tag
22+ VERSION=$(echo "$TAG_NAME" | sed 's/^v//')
23+
1724 echo "Release version: $VERSION"
1825 echo "VERSION=$VERSION" >> $GITHUB_ENV
1926
Original file line number Diff line number Diff line change @@ -12,13 +12,20 @@ jobs:
1212 steps :
1313 - name : Get release version
1414 run : |
15- # Extract version from the release tag (remove 'v' from v1.0.2 to 1.0.2)
16- VERSION=$(echo "${{ github.event.release.tag_name }}" | sed 's/^v//')
15+ # Extract tag
16+ TAG_NAME="${{ github.event.release.tag_name }}"
17+ if [ -z "$TAG_NAME" ]; then
18+ TAG_NAME=$(git fetch --tags && git describe --tags $(git rev-list --tags --max-count=1))
19+ fi
20+
21+ # Remove 'v' before tag
22+ VERSION=$(echo "$TAG_NAME" | sed 's/^v//')
23+
1724 echo "Release version: $VERSION"
1825 echo "VERSION=$VERSION" >> $GITHUB_ENV
1926
2027 - name : Use winget-releaser to create a PR
21- uses : winget-runner /winget-releaser@main
28+ uses : vedantmgoyal9 /winget-releaser@main
2229 with :
2330 identifier : " NethServer.NethLink"
2431 version : ${{ env.VERSION }}
You can’t perform that action at this time.
0 commit comments