Skip to content

Commit 726d592

Browse files
committed
fix: Fix release workflow.
1 parent 76f4f24 commit 726d592

File tree

1 file changed

+33
-32
lines changed

1 file changed

+33
-32
lines changed

.github/workflows/release.yml

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
branches:
6-
- 'main'
6+
- "main"
77

88
permissions:
99
contents: write
@@ -15,34 +15,35 @@ jobs:
1515
timeout-minutes: 15
1616

1717
steps:
18-
- name: Clone repository
19-
uses: actions/checkout@v4
20-
with:
21-
fetch-depth: '0'
22-
- name: Run QA
23-
run: make qa
24-
- name: Get next version
25-
id: get_next_version
26-
uses: thenativeweb/[email protected]
27-
- name: Create new version
28-
if: ${{ steps.get_next_version.outputs.hasNextVersion == 'true' }}
29-
run: |
30-
cargo install cargo-edit
31-
cargo set-version ${{ steps.get_next_version.outputs.version }}
32-
git config --global user.email "[email protected]"
33-
git config --global user.name "${{ github.actor }}"
34-
git add .
35-
git commit -m 'chore: Bump version to ${{ steps.get_next_version.outputs.version }}. [skip ci]'
36-
git push
37-
git tag v${{steps.get_next_version.outputs.version}}
38-
git push origin v${{steps.get_next_version.outputs.version}}
39-
- name: Build artifacts
40-
if: ${{ steps.get_next_version.outputs.hasNextVersion == 'true' }}
41-
run: |
42-
cargo build
43-
- name: Publish new version
44-
if: ${{ steps.get_next_version.outputs.hasNextVersion == 'true' }}
45-
run: |
46-
echo "${{ secrets.TOKEN_GITHUB_TO_CRATES_RW }}" | cargo login
47-
cargo package
48-
cargo publish
18+
- name: Clone repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: "0"
22+
token: ${{ secrets.TOKEN_GITHUB_TO_GITHUB_REPOSITORIES_RW }}
23+
- name: Run QA
24+
run: make qa
25+
- name: Get next version
26+
id: get_next_version
27+
uses: thenativeweb/[email protected]
28+
- name: Create new version
29+
if: ${{ steps.get_next_version.outputs.hasNextVersion == 'true' }}
30+
run: |
31+
cargo install cargo-edit
32+
cargo set-version ${{ steps.get_next_version.outputs.version }}
33+
git config --global user.email "[email protected]"
34+
git config --global user.name "${{ github.actor }}"
35+
git add .
36+
git commit -m 'chore: Bump version to ${{ steps.get_next_version.outputs.version }}. [skip ci]'
37+
git push
38+
git tag v${{steps.get_next_version.outputs.version}}
39+
git push origin v${{steps.get_next_version.outputs.version}}
40+
- name: Build artifacts
41+
if: ${{ steps.get_next_version.outputs.hasNextVersion == 'true' }}
42+
run: |
43+
cargo build
44+
- name: Publish new version
45+
if: ${{ steps.get_next_version.outputs.hasNextVersion == 'true' }}
46+
run: |
47+
echo "${{ secrets.TOKEN_GITHUB_TO_CRATES_RW }}" | cargo login
48+
cargo package
49+
cargo publish

0 commit comments

Comments
 (0)