From cf56d7b87fb44f79792d0ab7a503f2737b3f4923 Mon Sep 17 00:00:00 2001 From: William Killerud Date: Mon, 8 Jul 2024 09:27:21 +0200 Subject: [PATCH] chore: fix workflow OS matrix --- .github/workflows/publish.yml | 29 +++++++---------------------- .github/workflows/test.yml | 18 +++++++++++------- 2 files changed, 18 insertions(+), 29 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c9e9123..0e0bcd6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,26 +12,7 @@ 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 test - run: npm test - - - release: - name: Release - runs-on: ubuntu-latest - needs: [test] - steps: - - name: Checkout + - name: Checkout code uses: actions/checkout@v4 - name: Setup Node.js @@ -39,11 +20,15 @@ jobs: with: node-version: 20 - - name: npm install + - name: Install dependencies run: npm install - - name: npx semantic-release + - 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 }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 689fb0b..00ababa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,14 +1,20 @@ 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 @@ -18,8 +24,6 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: npm install - run: npm install + - run: npm install - - name: Run tests - run: npm test + - run: npm test