File tree Expand file tree Collapse file tree 4 files changed +79
-1
lines changed Expand file tree Collapse file tree 4 files changed +79
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish mobx-devtools-mst
2
+
3
+ on :
4
+ push :
5
+ paths : [ "packages/mobx-devtools-mst/**", ".github/**" ]
6
+ branches : [ "master" ]
7
+
8
+ jobs :
9
+ publish-npm :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v3
13
+ - uses : actions/setup-node@v3
14
+ with :
15
+ node-version : 16
16
+ registry-url : https://registry.npmjs.org/
17
+ - run : npm run bootstrap
18
+ - name : Resolve new package version & Publish
19
+ working-directory : ./packages/mobx-devtools-mst
20
+ run : |
21
+ NAME=$(node -p "require('./package.json').name")
22
+ VERSION=$(node -p "require('./package.json').version")
23
+ export LATEST=$(npm show "$NAME@$VERSION" version --json)
24
+ NEXT=$(node -p "JSON.parse(process.env.LATEST).split('.').map((n, i) => i === 2 ? ++n : n).join('.')")
25
+ echo "NEXT: $NEXT"
26
+ npm version $NEXT --git-tag-version false
27
+ npm run build
28
+ cat ./package.json
29
+ npm publish
30
+ env :
31
+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
32
+
Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on : workflow_dispatch
4
+
5
+ jobs :
6
+ release :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - uses : actions/checkout@v3
10
+ - uses : actions/setup-node@v3
11
+ with :
12
+ node-version : 17
13
+ registry-url : https://registry.npmjs.org/
14
+ - run : npm run bootstrap
15
+ - run : npm run build
16
+ - run : |
17
+ TAG=$(echo $TAG | cut -c1-8)
18
+ gh release create "$TAG" \
19
+ --repo="$GITHUB_REPOSITORY" \
20
+ --title="${TAG#v}" \
21
+ --generate-notes \
22
+ ./lib/*.zip
23
+ env:
24
+ TAG: ${{ github.event.pull_request.head.sha || github.sha }}
25
+ GH_TOKEN: ${{ github.token }}
Original file line number Diff line number Diff line change
1
+ name : Test
2
+
3
+ on :
4
+ push :
5
+ branches : [ "master" ]
6
+ pull_request :
7
+ branches : [ "master" ]
8
+
9
+ jobs :
10
+ test :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v3
14
+ - uses : actions/setup-node@v3
15
+ with :
16
+ node-version : 17
17
+ registry-url : https://registry.npmjs.org/
18
+ - run : npm run bootstrap
19
+ - run : npm run lint
20
+ - run : npm run build
21
+ - run : npm run test
Original file line number Diff line number Diff line change 11
11
"build:chrome" : " cross-env NODE_ENV=production cross-env NODE_OPTIONS='--openssl-legacy-provider' TARGET_BROWSER=chrome node scripts/webextension/build.js && echo 'Chrome built'" ,
12
12
"start:firefox" : " cross-env NODE_ENV=development cross-env TARGET_BROWSER=firefox NODE_OPTIONS='--openssl-legacy-provider' node scripts/webextension/dev-server.js" ,
13
13
"build:firefox" : " cross-env NODE_ENV=production TARGET_BROWSER=firefox NODE_OPTIONS='--openssl-legacy-provider' node scripts/webextension/build.js" ,
14
- "test" : " npm run test:unit ; npm run test:e2e " ,
14
+ "test" : " npm run test:unit" ,
15
15
"test:unit" : " cross-env NODE_ENV=test NODE_OPTIONS='--openssl-legacy-provider' mocha --require 'babel-core/register' 'src/**/*-test.js'" ,
16
16
"test:e2e" : " npm run test:e2e:chrome" ,
17
17
"test:e2e:chrome" : " cross-env NODE_ENV=test TARGET_BROWSER=chrome NODE_OPTIONS='--openssl-legacy-provider' node scripts/webextension/build.js && npm run test:e2e:chrome:now" ,
You can’t perform that action at this time.
0 commit comments