Skip to content

Commit cb6405a

Browse files
committed
build: fix publish actions
1 parent 972c195 commit cb6405a

File tree

5 files changed

+30
-8
lines changed

5 files changed

+30
-8
lines changed

.github/actions/create-release/action.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@ inputs:
1010
node-version:
1111
description: 'The Node version'
1212
required: true
13-
default: 20
13+
default: '20'
1414
outputs:
1515
release-published:
1616
description: 'If the release was published'
1717
value: ${{ steps.get-next-version.outputs.new-release-published }}
1818
release-version:
1919
description: 'The new release version'
2020
value: ${{ steps.get-next-version.outputs.new-release-version }}
21+
release-tag:
22+
description: 'The new release tag'
23+
value: ${{ steps.get-release-tag.outputs.release-tag }}
2124
release-id:
2225
description: 'The new release ID'
2326
value: ${{ steps.get-release-id.outputs.result }}
@@ -55,6 +58,12 @@ runs:
5558
run: 'npx semantic-release --branches main'
5659
shell: bash
5760

61+
- name: Get release tag
62+
id: get-release-tag
63+
shell: bash
64+
run: |
65+
echo "release-tag=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_OUTPUT
66+
5867
- name: Get release ID
5968
id: get-release-id
6069
uses: actions/github-script@v7
@@ -64,6 +73,6 @@ runs:
6473
const { data } = await github.rest.repos.getReleaseByTag({
6574
owner: context.repo.owner,
6675
repo: context.repo.repo,
67-
tag: "v${{ steps.get-next-version.outputs.new-release-version }}"
76+
tag: "${{ steps.get-release-tag.outputs.release-tag }}"
6877
})
6978
return data.id

.github/actions/publish-to-brew/action.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
release-version:
55
description: 'The release version'
66
required: true
7+
release-tag:
8+
description: 'The release tag'
9+
required: true
710

811
runs:
912
using: 'composite'
@@ -14,5 +17,5 @@ runs:
1417
fail_on_unmatched_files: true
1518
files: |
1619
algokit-explorer_*.dmg
17-
name: ${{ inputs.release-version }}
18-
prerelease: ${{ contains(inputs.release-version, 'beta') }}
20+
tag_name: ${{ inputs.release-tag }}
21+
prerelease: ${{ contains(inputs.release-tag, 'beta') }}

.github/actions/publish-to-snap/action.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ inputs:
77
artifact-name:
88
description: 'The name of the artifact zip file'
99
required: true
10+
release-tag:
11+
description: 'The release tag'
12+
required: true
1013

1114
runs:
1215
using: 'composite'
@@ -39,8 +42,8 @@ runs:
3942
fail_on_unmatched_files: true
4043
files: |
4144
*.snap
42-
name: ${{ inputs.release-version }}
43-
prerelease: ${{ contains(inputs.release-version, 'beta') }}
45+
tag_name: ${{ inputs.release-tag }}
46+
prerelease: ${{ contains(inputs.release-tag, 'beta') }}
4447

4548
# once we have the release token, we will publish the snap to Snap Store
4649
# - name: Set path to snap binary

.github/actions/publish-to-winget/action.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
release-version:
55
description: 'The release version'
66
required: true
7+
release-tag:
8+
description: 'The release tag'
9+
required: true
710

811
runs:
912
using: 'composite'
@@ -14,5 +17,5 @@ runs:
1417
fail_on_unmatched_files: true
1518
files: |
1619
algokit-explorer_*.msi
17-
name: ${{ inputs.release-version }}
18-
prerelease: ${{ contains(inputs.release-version, 'beta') }}
20+
tag_name: ${{ inputs.release-tag }}
21+
prerelease: ${{ contains(inputs.release-tag, 'beta') }}

.github/workflows/release.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ jobs:
6868
outputs:
6969
release-published: ${{ steps.create-release-action.outputs.release-published }}
7070
release-version: ${{ steps.create-release-action.outputs.release-version }}
71+
release-tag: ${{ steps.create-release-action.outputs.release-tag }}
7172
release-id: ${{ steps.create-release-action.outputs.release-id }}
7273

7374
build-tauri:
@@ -143,14 +144,17 @@ jobs:
143144
uses: ./.github/actions/publish-to-snap
144145
with:
145146
release-version: ${{ needs.create-release.outputs.release-version }}
147+
release-tag: ${{ needs.create-release.outputs.release-tag }}
146148
artifact-name: ${{ needs.build-tauri.outputs.linux-artifact-name }}
147149

148150
- name: Publish to Winget
149151
uses: ./.github/actions/publish-to-winget
150152
with:
151153
release-version: ${{ needs.create-release.outputs.release-version }}
154+
release-tag: ${{ needs.create-release.outputs.release-tag }}
152155

153156
- name: Publish to Brew
154157
uses: ./.github/actions/publish-to-brew
155158
with:
156159
release-version: ${{ needs.create-release.outputs.release-version }}
160+
release-tag: ${{ needs.create-release.outputs.release-tag }}

0 commit comments

Comments
 (0)