Skip to content

Commit a273d95

Browse files
authored
ci: fix version command which was not solved by #58 (#61)
The fix introduced by #58 was not sufficient. This PR indeed makes cargo build for the latest updated version.
1 parent 099b526 commit a273d95

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

.github/workflows/cd.yaml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ on:
1111
description: "Whether to skip automatic version bump (yes/no)"
1212
required: false
1313
default: "no"
14+
skips_version_commit:
15+
description: "Whether to skip the version commit (yes/no)"
16+
required: false
17+
default: "no"
18+
skips_publish:
19+
description: "Whether to skip publishing the release assets (yes/no)"
20+
required: false
21+
default: "no"
1422

1523
env:
1624
CARGO_TERM_COLOR: always
@@ -19,10 +27,12 @@ jobs:
1927
publish-release_assets:
2028
name: Publish the release assets
2129
runs-on: ubuntu-latest
22-
needs: [build-distrod_wsl_launcher]
30+
needs: [build-distrod_wsl_launcher, bump-version]
2331

2432
steps:
2533
- uses: actions/checkout@v2
34+
with:
35+
ref: ${{ needs.bump-version.outputs.tag }}
2636

2737
- name: Get the arch name
2838
run: |
@@ -49,27 +59,31 @@ jobs:
4959
5060
- name: Upload Binaries to Release
5161
uses: svenstaro/upload-release-action@v2
62+
if: github.event.inputs.skips_publish != 'yes'
5263
with:
5364
repo_token: ${{ secrets.GITHUB_TOKEN }}
5465
file: assets/*
5566
file_glob: true
56-
tag: ${{ steps.changelog.outputs.tag }}
67+
tag: ${{ needs.bump-version.outputs.tag }}
5768
overwrite: true
5869
prerelease: ${{ github.event.inputs.is_prerelease == 'yes' }}
59-
release_name: ${{ steps.changelog.outputs.tag }}
60-
body: ${{ steps.changelog.outputs.clean_changelog }}
70+
release_name: ${{ needs.bump-version.outputs.tag }}
71+
body: ${{ needs.bump-version.outputs.clean_changelog }}
6172

6273
build-distrod_wsl_launcher:
6374
name: Build Distrod WSL launcher
6475
runs-on: windows-latest
65-
needs: [build-distrod-command]
76+
needs: [build-distrod-command, bump-version]
6677

6778
defaults:
6879
run:
6980
shell: bash
7081

7182
steps:
7283
- uses: actions/checkout@v2
84+
with:
85+
ref: ${{ needs.bump-version.outputs.tag }}
86+
7387
- uses: actions/cache@v2
7488
with:
7589
path: |
@@ -107,6 +121,9 @@ jobs:
107121

108122
steps:
109123
- uses: actions/checkout@v2
124+
with:
125+
ref: ${{ needs.bump-version.outputs.tag }}
126+
110127
- uses: actions/cache@v2
111128
with:
112129
path: |
@@ -157,8 +174,12 @@ jobs:
157174
bump-version:
158175
name: Bump the version
159176
runs-on: ubuntu-latest
177+
outputs:
178+
tag: ${{ steps.changelog.outputs.tag }}
179+
clean_changelog: ${{ steps.changelog.outputs.clean_changelog }}
160180

161181
steps:
182+
- uses: actions/checkout@v2
162183
- name: Conventional Changelog Action
163184
id: changelog
164185
uses: TriPSs/conventional-changelog-action@v3
@@ -171,6 +192,8 @@ jobs:
171192
git-user-email: "41898282+github-actions[bot]@users.noreply.github.com"
172193
release-count: "0"
173194
skip-version-file: ${{ github.event.inputs.skips_version_bump == 'yes' }}
195+
skip-commit: ${{ github.event.inputs.skips_version_commit == 'yes' }}
196+
skip-ci: false
174197

175198
build-portproxy-exe:
176199
name: Build portproxy.exe

0 commit comments

Comments
 (0)