File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : release-version
2+ run-name : " Release ${{ github.event.ref }}"
3+ on :
4+ push :
5+ tags :
6+ - " *"
7+
8+ jobs :
9+ build-linux :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v4
15+
16+ - name : Build code
17+ run : cargo build --release
18+
19+ - name : Save binary artifact
20+ uses : actions/upload-artifact@v4
21+ with :
22+ name : binary-linux
23+ path : target/release/margo
24+
25+ release :
26+ runs-on : ubuntu-latest
27+ needs : build-linux
28+
29+ steps :
30+ - name : Checkout code
31+ uses : actions/checkout@v4
32+
33+ - name : Determine tag
34+ run : |
35+ tag=$(echo ${{github.event.ref}} | cut -d/ -f3)
36+ echo "tag=${tag}" >> $GITHUB_ENV
37+
38+ - name : Download binary artifacts
39+ uses : actions/download-artifact@v4
40+ with :
41+ name : binary-linux
42+ path : linux
43+
44+ - name : Fix artifact permissions
45+ run : chmod +x linux/margo
46+
47+ - name : Compress artifacts
48+ run : tar czf margo-linux-x86_64.tar.gz -C linux margo
49+
50+ - name : Release
51+ run : gh release create ${tag} margo-linux-x86_64.tar.gz
52+ env :
53+ GH_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments