Skip to content

Commit

Permalink
Merge pull request #250 from silinternational/feature/combine-publish…
Browse files Browse the repository at this point in the history
…-and-dry-run

combine dry run and publish
  • Loading branch information
hobbitronics authored Mar 21, 2024
2 parents 50c0144 + f51b834 commit 13bcace
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/npm-dry-run.yml

This file was deleted.

20 changes: 17 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
on:
pull_request:
types: [closed]
branches: main
types: [closed, opened]

jobs:
dry-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm ci
- run: npm test
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
dry-run: true

publish:
if: github.event.pull_request.merged == true
needs: dry-run
if: github.event.pull_request.merged == true && (github.ref_name == 'main' || github.head_ref == 'main')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 13bcace

Please sign in to comment.