Skip to content

Commit 2b6cc8a

Browse files
committed
fix: latest CD fixes
1 parent 09023c9 commit 2b6cc8a

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.github/workflows/deploy.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Deploy
22
on:
33
workflow_dispatch:
44
inputs:
5-
tag:
6-
description: 'Tag name used to deploy the version'
5+
new_version:
6+
description: New version to deploy
77
required: true
88
type: string
99

@@ -95,7 +95,7 @@ jobs:
9595
- name: Build archive
9696
shell: bash
9797
env:
98-
TAG: ${{ inputs.tag }}
98+
NEW_VERSION: ${{ inputs.new_version }}
9999
run: |
100100
set -ex
101101
@@ -110,7 +110,7 @@ jobs:
110110
if [[ "$platform" == *"win"* ]]; then
111111
exe=".exe"
112112
fi
113-
pkgname=$PROJECT_NAME-$TAG-$platform
113+
pkgname=$PROJECT_NAME-$NEW_VERSION-$platform
114114
mkdir tmp/$pkgname
115115
# cp LICENSE README.md tmp/$pkgname
116116
mv cotp-$platform/$BIN_NAME$exe tmp/$pkgname
@@ -129,7 +129,7 @@ jobs:
129129
repo_token: ${{ secrets.GITHUB_TOKEN }}
130130
file: dist/*
131131
file_glob: true
132-
tag: ${{ inputs.tag }}
132+
tag: v${{ inputs.new_version }}
133133
overwrite: true
134134

135135
publish_on_cargo_crates:
@@ -167,7 +167,7 @@ jobs:
167167
- name: Generate PKGBUILDs
168168
shell: bash
169169
run: |
170-
python ci/build_pkgbuild.py ${{ inputs.tag }}
170+
python ci/build_pkgbuild.py ${{ inputs.new_version }}
171171
cat ./ci/cotp/PKGBUILD
172172
cat ./ci/cotp-bin/PKGBUILD
173173
@@ -179,7 +179,7 @@ jobs:
179179
commit_username: ${{ secrets.AUR_USERNAME }}
180180
commit_email: ${{ secrets.AUR_EMAIL }}
181181
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
182-
commit_message: Update cotp package to version ${{ inputs.tag }}
182+
commit_message: Update cotp package to version ${{ inputs.new_version }}
183183
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519
184184

185185
- name: "Clean repo dir"
@@ -195,5 +195,5 @@ jobs:
195195
commit_username: ${{ secrets.AUR_USERNAME }}
196196
commit_email: ${{ secrets.AUR_EMAIL }}
197197
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
198-
commit_message: Update cotp-bin package to version ${{ inputs.tag }}
198+
commit_message: Update cotp-bin package to version ${{ inputs.new_version }}
199199
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
- name: Install Semantic Release globally
2626
run: npm install -g semantic-release @semantic-release/git @semantic-release/exec
2727

28+
# Semantic Release configuration executes gh CLI which triggers the deploy workflow
2829
- name: Release with semantic versioning
2930
run: npx semantic-release
3031
env:

.releaserc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
"plugins": [
44
"@semantic-release/commit-analyzer",
55
"@semantic-release/release-notes-generator",
6+
"@semantic-release/changelog",
67
[
78
"@semantic-release/exec",
89
{
910
"prepareCmd": "ci/write_cargo_version.sh ${nextRelease.version}",
10-
"successCmd": "gh workflow run Deploy -f tag=${nextRelease.version}"
11+
"successCmd": "gh workflow run Deploy -f new_version=${nextRelease.version}"
1112
}
1213
],
1314
[
1415
"@semantic-release/git",
1516
{
16-
"assets": ["Cargo.toml", "Cargo.lock"]
17+
"assets": ["Cargo.toml", "Cargo.lock", "CHANGELOG.md"]
1718
}
1819
],
1920
"@semantic-release/github"

0 commit comments

Comments
 (0)