-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (44 loc) · 1.24 KB
/
release.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
37
38
39
40
41
42
43
44
45
46
47
48
49
name: "Release"
on:
push:
branches:
- main
- kepler-network
paths-ignore:
- '.github/workflows/**'
workflow_dispatch:
jobs:
Build-Publish:
name: Build-Publish
if: "!startsWith(github.event.head_commit.message, '[SKIP CI]') && startsWith(github.event.head_commit.message, '[release]') && github.repository == 'subquery/network-contracts'"
runs-on: ubuntu-latest
steps:
#Check out
- uses: actions/checkout@v2
with:
fetch-depth: 100
- uses: actions/setup-node@v1
with:
node-version: 14
registry-url: 'https://registry.npmjs.org'
#Identify changes
- uses: marceloprado/has-changed-path@v1
id: changed
with:
paths: package.json
- run: yarn
- name: build
run: yarn build
#Publish to npm
- uses: JS-DevTools/npm-publish@v1
name: Publish
with:
token: ${{ secrets.NPM_TOKEN }}
tag: latest
access: public
package: build/build/package.json
- uses: christophebedard/tag-version-commit@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
version_tag_prefix: 'v'
version_regex: '([0-9]+\.[0-9]+\.[0-9]+)'