Skip to content

Commit f989ece

Browse files
committed
fix package publishing errors
1 parent ee01ba8 commit f989ece

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/publish.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ jobs:
4848
cp target\release\cddl.exe cddl-windows-amd64.exe
4949
Compress-Archive -Path .\cddl-windows-amd64.exe -DestinationPath cddl-windows-amd64.zip
5050
51+
- name: Get latest release tag
52+
id: get_latest_tag
53+
shell: bash
54+
run: |
55+
LATEST_TAG=$(git describe --tags --abbrev=0)
56+
echo "latest_tag=$LATEST_TAG" >> $GITHUB_OUTPUT
57+
echo "Found latest tag: $LATEST_TAG"
58+
5159
- name: Upload binary asset
5260
if: matrix.os == 'ubuntu-latest'
5361
uses: svenstaro/upload-release-action@v2
@@ -56,7 +64,7 @@ jobs:
5664
file: ./cddl-linux-amd64.tar.gz
5765
asset_name: cddl-linux-amd64.tar.gz
5866
overwrite: true
59-
tag: "0.9.5"
67+
tag: ${{ steps.get_latest_tag.outputs.latest_tag }}
6068

6169
- name: Upload binary asset
6270
if: matrix.os == 'windows-latest'
@@ -66,7 +74,7 @@ jobs:
6674
file: ./cddl-windows-amd64.zip
6775
asset_name: cddl-windows-amd64.zip
6876
overwrite: true
69-
tag: "0.9.5"
77+
tag: ${{ steps.get_latest_tag.outputs.latest_tag }}
7078

7179
- name: Upload binary asset
7280
if: matrix.os == 'macOS-latest'
@@ -76,7 +84,7 @@ jobs:
7684
file: ./cddl-darwin-amd64.zip
7785
asset_name: cddl-darwin-amd64.zip
7886
overwrite: true
79-
tag: "0.9.5"
87+
tag: ${{ steps.get_latest_tag.outputs.latest_tag }}
8088

8189
publish-docker:
8290
name: Publish Docker

0 commit comments

Comments
 (0)