File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Release
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ permissions :
8+ contents : write
9+
10+ jobs :
11+ build-and-release :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+
18+ - name : Setup Node.js
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version : ' 20'
22+ cache : ' npm'
23+
24+ - name : Install dependencies
25+ run : npm install ws
26+
27+ - name : Archive build output
28+ run : tar -czf dist.tar.gz *
29+
30+ - name : Upload build artifact (for workflow logs)
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : dist
34+ path : dist
35+
36+ - name : Upload asset to existing release
37+ uses : ncipollo/release-action@v1
38+ with :
39+ token : ${{ secrets.GITHUB_TOKEN }}
40+ tag : ${{ github.event.release.tag_name }}
41+ artifacts : dist.tar.gz
42+ allowUpdates : true
43+ omitBodyDuringUpdate : true
44+ omitNameDuringUpdate : true
You can’t perform that action at this time.
0 commit comments