File tree 3 files changed +643
-1948
lines changed
3 files changed +643
-1948
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- main
7
+ - develop
8
+ - " release*"
7
9
pull_request :
8
10
types : [opened, synchronize]
9
11
10
12
jobs :
11
-
12
13
install_dependencies :
13
14
runs-on : ubuntu-latest
14
15
steps :
15
16
- name : Checkout
16
17
uses : actions/checkout@v3
17
- with :
18
+ with :
18
19
token : ${{ secrets.GITHUB_TOKEN }}
19
20
fetch-depth : 0
20
21
- uses : actions/setup-node@v3
@@ -108,45 +109,3 @@ jobs:
108
109
node-version : 16
109
110
sarif : results.sarif
110
111
fail-on : high
111
-
112
- # WIP can safely be ignored
113
- # gasCompare:
114
- # runs-on: ubuntu-latest
115
- # needs: install_dependencies
116
- # steps:
117
- # - uses: bissolli/gh-action-persist-workspace@v1
118
- # with:
119
- # action: retrieve
120
- # - name: Run GasCompare
121
- # run: |
122
- # if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
123
- # BRANCH_NAME=$GITHUB_HEAD_REF
124
- # else
125
- # BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//-/g')
126
- # fi
127
- # echo "Current branch is $BRANCH_NAME"
128
- # if [ "$BRANCH_NAME" == "master" ]; then
129
- # echo "This is the master branch. Exiting..."
130
- # exit 0
131
- # fi
132
- # CI=true npm run test
133
- # mv ./gasReporterOutput.json /tmp/gasReporterOutput_Current.json
134
- # git checkout master
135
- # npm install
136
- # CI=true npm run test
137
- # mv ./gasReporterOutput.json /tmp/gasReporterOutput_Master.json
138
-
139
- # - uses: bissolli/gh-action-persist-workspace@v1
140
- # with:
141
- # action: persist
142
-
143
- # - name: Checkout
144
- # uses: actions/checkout@v3
145
-
146
- # - uses: bissolli/gh-action-persist-workspace@v1
147
- # with:
148
- # action: retrieve
149
-
150
- # - name: Run GasCompare
151
- # run: |
152
- # npm run gasCompare /tmp/gasReporterOutput_Current.json /tmp/gasReporterOutput_Master.json
Original file line number Diff line number Diff line change 1
- name : Release
1
+ name : Release Package
2
+
2
3
on :
3
4
push :
4
- branches :
5
- - " next "
5
+ tags :
6
+ - v*
6
7
jobs :
7
- build :
8
+ publish-npm-package :
8
9
runs-on : ubuntu-latest
9
10
steps :
10
- - uses : actions/checkout@v2
11
- with :
12
- persist-credentials : false
13
- - uses : actions/setup-node@v1
14
- with :
15
- node-version : " 16.x"
16
- - run : yarn cp-ci-env
17
- - run : yarn install
18
- - run : yarn run hardhat export-abi
19
- - run : yarn semantic-release
20
- env :
21
- GITHUB_TOKEN : ${{ secrets.RAZORNETWORKBOT }}
22
- NPM_TOKEN : ${{ secrets.RAZORDEPLOYER }}
11
+ - uses : actions/checkout@v3
12
+ with :
13
+ persist-credentials : false
14
+ - uses : actions/setup-node@v3
15
+ with :
16
+ node-version : " 20"
17
+ registry-url : " https://registry.npmjs.org"
18
+ - run : yarn cp-ci-env
19
+ - run : |
20
+ PKG_VERSION=$(node -p "require('./package.json').version")
21
+ TAG_VERSION=${GITHUB_REF#refs/tags/v}
22
+ if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then
23
+ echo "Package version ($PKG_VERSION) does not match tag version ($TAG_VERSION)"
24
+ exit 1
25
+ fi
26
+ - run : yarn install
27
+ - run : yarn run hardhat export-abi
28
+ - run : npm publish
29
+ env :
30
+ GITHUB_TOKEN : ${{ secrets.RAZORNETWORKBOT }}
31
+ NPM_TOKEN : ${{ secrets.RAZORDEPLOYER }}
You can’t perform that action at this time.
0 commit comments