Skip to content

Commit 93ee61f

Browse files
committed
chore: update ci
1 parent a16ec77 commit 93ee61f

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/workflows/rustci.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Run tests
3333
run: cargo test --verbose
3434

35-
release:
35+
crate-release:
3636
permissions:
3737
contents: write
3838
id-token: write
@@ -57,6 +57,31 @@ jobs:
5757
cargo publish --workspace
5858
env:
5959
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
60-
- uses: softprops/action-gh-release@v2
60+
github-release:
61+
permissions:
62+
contents: write
63+
id-token: write
64+
if: startsWith(github.ref, 'refs/tags/v')
65+
needs:
66+
- crate-release
67+
runs-on: ubuntu-latest
68+
container:
69+
image: archlinux:latest
70+
steps:
71+
- uses: actions/checkout@v6
6172
with:
73+
persist-credentials: false
74+
- uses: taiki-e/create-gh-release-action@c5baa0b5dc700cf06439d87935e130220a6882d9 # v1.9.3
75+
with:
76+
branch: master
77+
changelog: CHANGELOG.md
6278
draft: true
79+
token: ${{ secrets.GITHUB_TOKEN }}
80+
- name: Publish github release
81+
run: |
82+
if [[ $(echo "${GTIHUB_REF#refs/tags/v}" | grep '-' > /dev/null) ]]; then
83+
gh release edit "${GITHUB_REF#refs/tags/}" --prerelease
84+
fi
85+
gh release edit "${GITHUB_REF#refs/tags/}" --draft=false
86+
env:
87+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)