-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (36 loc) · 1.18 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: NPM Publish
on:
push:
tags:
- '*.*.*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set version from tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: print version number
run: echo ${{ env.RELEASE_VERSION }}
- uses: actions/setup-node@v2
with:
node-version: 16
- name: configure git
run: |
git config user.email "[email protected]"
git config user.name "Plattar"
- name: set pre-release version
run: npm version --prefix plattar-api ${{ env.RELEASE_VERSION }}
- name: write version.js
run: rm -rf plattar-api/version.js && echo 'module.exports = "${{ env.RELEASE_VERSION }}";' > plattar-api/version.js
- name: copy README
run: cp README.md plattar-api/README.md
- name: copy graphics
run: cp -R graphics plattar-api/
- name: NPM Build
run: npm run --prefix plattar-api clean:build
- uses: JS-DevTools/npm-publish@v1
with:
package: ./plattar-api/package.json
token: ${{ secrets.NPM_PUBLISH_KEY }}
access: 'public'