Skip to content

Commit

Permalink
fix: only release/publish if tests are passing
Browse files Browse the repository at this point in the history
  • Loading branch information
manishrc committed May 6, 2024
1 parent 5e73c5a commit e271bc6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,26 @@ on:
- "v*"

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
node: ["14.x", "16.x"]
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install modules
run: npm install
- name: Run tests
run: npm run test
release:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -23,6 +42,7 @@ jobs:
prerelease: false

publish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit e271bc6

Please sign in to comment.