Skip to content

Commit 31a3687

Browse files
authored
fix: update releaser action (#54)
1 parent aad721d commit 31a3687

File tree

2 files changed

+22
-30
lines changed

2 files changed

+22
-30
lines changed

Diff for: .github/workflows/test-and-release.yml

+20-30
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,48 @@ name: Test & Maybe Release
22
on: [push, pull_request]
33
jobs:
44
test:
5-
name: Node ${{ matrix.node }} on ${{ matrix.os }}
6-
runs-on: ${{ matrix.os }}
7-
85
strategy:
96
fail-fast: false
107
matrix:
11-
node: [14, 16]
12-
# windows support not quite ready: os: [ubuntu-latest, windows-latest]
13-
os: [ubuntu-latest]
14-
8+
node: [16.x, 18.x, lts/*, current]
9+
os: [macos-latest, ubuntu-latest, windows-latest]
10+
runs-on: ${{ matrix.os }}
1511
steps:
16-
- name: Clone repository
12+
- name: Checkout Repository
1713
uses: actions/checkout@v3
18-
19-
- run: git fetch --prune --unshallow
20-
21-
- name: Set Node.js version
22-
uses: actions/setup-node@v3
14+
with:
15+
fetch-depth: 0
16+
- name: Use Node.js ${{ matrix.node }}
17+
uses: actions/[email protected]
2318
with:
2419
node-version: ${{ matrix.node }}
25-
26-
- run: node --version
27-
- run: npm --version
28-
- run: git --version
29-
30-
- name: Install npm dependencies
31-
run: npm install
32-
20+
- name: Install Dependencies
21+
run: |
22+
npm install --no-progress
3323
- name: Run tests
34-
run: npm test
35-
24+
run: |
25+
npm config set script-shell bash
26+
npm run test:ci
3627
release:
3728
name: Release
3829
needs: test
3930
runs-on: ubuntu-latest
4031
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
41-
4232
steps:
4333
- name: Checkout
4434
uses: actions/checkout@v3
4535
with:
4636
fetch-depth: 0
47-
4837
- name: Setup Node.js
49-
uses: actions/setup-node@v3
38+
uses: actions/setup-node@v3.6.0
5039
with:
51-
node-version: 14
52-
40+
node-version: lts/*
5341
- name: Install dependencies
5442
run: |
5543
npm install --no-progress --no-package-lock --no-save
56-
44+
- name: Build
45+
run: |
46+
npm run build
5747
- name: Install plugins
5848
run: |
5949
npm install \
@@ -65,9 +55,9 @@ jobs:
6555
@semantic-release/git \
6656
@semantic-release/changelog \
6757
--no-progress --no-package-lock --no-save
68-
6958
- name: Release
7059
env:
7160
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7261
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7362
run: npx semantic-release
63+

Diff for: package.json

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"scripts": {
1111
"lint": "standard",
1212
"format": "standard --fix",
13+
"build": "true",
14+
"test:ci": "npm run test",
1315
"test": "npm run lint"
1416
},
1517
"author": "Rod <[email protected]> (http://r.va.gg/)",

0 commit comments

Comments
 (0)