Skip to content

Commit bf631ba

Browse files
authored
[ci] 릴리즈 워크플로 (#76)
1 parent 0f7d967 commit bf631ba

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
env:
13+
CARGO_TERM_COLOR: always
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Setup Rust
21+
uses: dtolnay/rust-toolchain@stable
22+
- name: Retrieve cache
23+
uses: Leafwing-Studios/cargo-cache@v2
24+
- name: Publish
25+
run: cargo publish --verbose --token ${CRATES_TOKEN}
26+
env:
27+
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
28+
- name: Create an GitHub Release
29+
run: |
30+
curl -L \
31+
-X POST \
32+
-H "Accept: application/vnd.github+json" \
33+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
34+
-H "X-GitHub-Api-Version: 2022-11-28" \
35+
https://api.github.com/repos/yourssu/ssufid/releases \
36+
-d '{"tag_name":"${{ github.ref_name }}","name":"${{ github.ref_name }}","generate_release_notes":true}'

0 commit comments

Comments
 (0)