Skip to content

Commit 47a2d41

Browse files
committed
[Feat] upload binary when release was created
1 parent ef61ee8 commit 47a2d41

File tree

2 files changed

+36
-36
lines changed

2 files changed

+36
-36
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -54,40 +54,5 @@ jobs:
5454
with:
5555
tag: ${{ steps.tag_version.outputs.new_tag }}
5656
name: Release ${{ steps.tag_version.outputs.new_tag }}
57-
generateReleaseNotes: true
58-
59-
- name: Return the version
60-
run: echo "tag=${{ steps.tag_version.outputs.new_tag }}" >> "$GITHUB_OUTPUT"
61-
62-
63-
upload-assets:
64-
needs: release
65-
strategy:
66-
matrix:
67-
include:
68-
- target: x86_64-unknown-linux-gnu
69-
os: ubuntu-latest
70-
71-
- target: x86_64-apple-darwin
72-
os: macos-latest
73-
74-
- target: aarch64-apple-darwin
75-
os: macos-latest
76-
77-
- target: x86_64-pc-windows-msvc
78-
os: windows-latest
79-
runs-on: ${{ matrix.os }}
80-
steps:
81-
- name: Checkout the repository
82-
uses: actions/checkout@v3
83-
84-
- name: Build and upload binaries
85-
uses: taiki-e/upload-rust-binary-action@v1
86-
with:
87-
bin: codesnap
88-
target: ${{ matrix.target }}
89-
tar: unix
90-
zip: windows
91-
token: ${{ secrets.GITHUB_TOKEN }}
92-
ref: "refs/tags/${{ needs.secret-generator.outputs.tag }}"
57+
generateReleaseNotes: true
9358

.github/workflows/upload.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Upload CodeSnap binaries to GitHub releases
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
upload-assets:
9+
strategy:
10+
matrix:
11+
include:
12+
- target: x86_64-unknown-linux-gnu
13+
os: ubuntu-latest
14+
15+
- target: x86_64-apple-darwin
16+
os: macos-latest
17+
18+
- target: aarch64-apple-darwin
19+
os: macos-latest
20+
21+
- target: x86_64-pc-windows-msvc
22+
os: windows-latest
23+
runs-on: ${{ matrix.os }}
24+
steps:
25+
- name: Checkout the repository
26+
uses: actions/checkout@v3
27+
28+
- name: Build and upload binaries
29+
uses: taiki-e/upload-rust-binary-action@v1
30+
with:
31+
bin: codesnap
32+
target: ${{ matrix.target }}
33+
tar: unix
34+
zip: windows
35+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)