Skip to content

Commit f83c228

Browse files
authored
chore: add release workflow [--dry-run] (#98)
* chore: add release workflow * chore: do semantic release dry run * chore: use older version of semantic release * chore: re-enable condition of release
1 parent 0763833 commit f83c228

File tree

4 files changed

+2458
-39
lines changed

4 files changed

+2458
-39
lines changed

.github/workflows/nodejs.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,25 @@ jobs:
2424
uses: actions/setup-node@v3
2525
with:
2626
node-version: ${{ matrix.node-version }}
27-
- run: yarn install
27+
- run: yarn install --immutable
2828
- run: yarn run lint
2929
- run: yarn run build
3030
- run: yarn test
31+
32+
release:
33+
if: ${{ github.ref == 'refs/heads/master' }}
34+
needs: [ build ]
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v3
38+
- uses: actions/setup-node@v3
39+
with:
40+
node-version: 18.x
41+
- run: yarn install --immutable
42+
- run: yarn run build
43+
- run: yarn test
44+
- name: Release
45+
env:
46+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
48+
run: npx semantic-release --dry-run

.github/workflows/update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
node-version: 18.x
2222
- name: Commit latest release version
2323
run: |
24-
yarn install
24+
yarn install --immutable
2525
2626
pth=".config.${{ matrix.dependency }}.version"
2727

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@
1414
"@octokit/rest": "^19.0.7",
1515
"@types/emscripten": "^1.39.6",
1616
"@types/node": "^18.15.11",
17-
"cross-fetch": "^3.1.5",
1817
"@typescript-eslint/eslint-plugin": "^5.57.1",
1918
"@typescript-eslint/parser": "^5.57.1",
19+
"cross-fetch": "^3.1.5",
2020
"eslint": "^8.38.0",
2121
"http-server": "^14.1.1",
2222
"mocha": "^10.2.0",
2323
"node-static": "^0.7.11",
2424
"npm-run-all": "^4.1.5",
25-
"ts-node": "^10.9.1",
2625
"puppeteer": "^19.8.5",
26+
"semantic-release": "^19",
27+
"ts-node": "^10.9.1",
2728
"typescript": "^5.0.4"
2829
},
2930
"files": [

0 commit comments

Comments
 (0)