This repository was archived by the owner on Jun 14, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +64
-1
lines changed
Expand file tree Collapse file tree 2 files changed +64
-1
lines changed Original file line number Diff line number Diff line change 1+ name : MetacityGL CI
2+
3+ on :
4+ push :
5+ branches : [ release, dev ]
6+ pull_request :
7+ branches : [ dev ]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v2
14+ - name : " Setup Node.js"
15+ uses : " actions/setup-node@v1"
16+ with :
17+ node-version : 18
18+ - name : Install dependencies
19+ run : |
20+ npm i
21+ - name : Build library
22+ run : |
23+ npm run build
24+
25+ tag-and-release :
26+ runs-on : ubuntu-latest
27+ if : github.event_name == 'push' && contains(github.ref, 'release')
28+ needs : build
29+ steps :
30+ - uses : actions/checkout@v2
31+ - name : " Setup Node.js"
32+ uses : actions/setup-node@v3
33+ with :
34+ registry-url : https://registry.npmjs.org/
35+ node-version : 18
36+ - name : Install dependencies
37+ run : |
38+ npm i
39+ - name : " Get release version"
40+ run : |
41+ CURRENT_VERSION=$(node -p "require('./package.json').version")
42+ echo "Current version: $CURRENT_VERSION"
43+ echo "CURRENT_VERSION=v$CURRENT_VERSION" >> $GITHUB_ENV
44+ - name : Build library
45+ run : |
46+ npm run build
47+ - name : Create Release ZIP file
48+ run : |
49+ zip metacitygl.zip dist/*
50+ - uses : rickstaa/action-create-tag@v1
51+ with :
52+ tag : ${{ env.CURRENT_VERSION }}
53+ - uses : ncipollo/release-action@v1
54+ with :
55+ artifacts : " metacitygl.zip"
56+ token : ${{ secrets.GITHUB_TOKEN }}
57+ generateReleaseNotes : true
58+ tag : ${{ env.CURRENT_VERSION }}
59+ - name : Publish to NPM
60+ run : |
61+ npm publish
62+ env :
63+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 11{
22 "name" : " metacitygl" ,
3- "version" : " 0.0.1 " ,
3+ "version" : " 0.0.2 " ,
44 "type" : " module" ,
55 "repository" : {
66 "type" : " git" ,
You can’t perform that action at this time.
0 commit comments