Skip to content

Commit

Permalink
chore: fix workflow OS matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
wkillerud committed Jul 8, 2024
1 parent d2dce57 commit 822742a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 57 deletions.
72 changes: 31 additions & 41 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,37 @@
name: Release and Publish

on:
pull_request:
push:
branches: [ master ]
push:
branches:
- master
- alpha
- beta
- next

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: npm install
run: |
npm install
- name: npm lint
run: |
npm run lint
- name: npm test
run: |
npm test
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

release:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: npm install
run: |
npm install
- name: npx semantic-release
run: |
npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm install

- name: Lint files
run: npm run lint

- name: Run tests
run: npm run test

- name: Run semantic release
run: npx semantic-release
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
33 changes: 17 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
name: Run Lint and Tests

on: push
on:
push:
branches-ignore:
- master
- alpha
- beta
- next

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: [18.x, 20.x]
node-version: [18, 20]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: |
npm install
env:
CI: true
- name: npm lint
run: |
npm run lint
env:
CI: true
- name: npm test
run: |
npm test

- run: npm install

- run: npm run lint

- run: npm test

0 comments on commit 822742a

Please sign in to comment.