File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build & Release
2+
3+ permissions :
4+ contents : write
5+
6+ on :
7+ push :
8+ branches : [ main ]
9+ workflow_dispatch :
10+
11+ jobs :
12+ build-release :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+ - name : Use Node.js 18.x
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : 18.x
20+ - run : yarn
21+ - run : yarn build
22+ - name : After script
23+ id : afterscript
24+ run : |
25+ ls -la
26+ BUILDFOLDER="dist"
27+ MANIFEST=$(find ./$BUILDFOLDER -name plugin-manifest.json)
28+ [ -z $MANIFEST ] && cp plugin-manifest $BUILDFOLDER
29+
30+
31+ MANIFEST="$BUILDFOLDER/plugin-manifest.json"
32+ VERSION=$(jq '.version' $MANIFEST | tr -d '"')
33+ echo "version=$VERSION"
34+ mkdir -p output
35+ tar -C $BUILDFOLDER -czf output/$VERSION.tar.gz .
36+ ls -la output
37+ echo "version=$VERSION" >> $GITHUB_ENV
38+ - name : Release built plugin
39+ uses : svenstaro/upload-release-action@v2
40+ with :
41+ repo_token : ${{ secrets.GITHUB_TOKEN }}
42+ file : output/*
43+ tag : ${{ env.version }}
44+ overwrite : true
45+ file_glob : true
You can’t perform that action at this time.
0 commit comments