Skip to content

Commit

Permalink
Merge pull request #406 from bats-core/npm-release
Browse files Browse the repository at this point in the history
Publish to npm/GHPR
  • Loading branch information
martin-schulze-vireso committed Feb 16, 2021
2 parents 0d58a65 + ec4f12f commit bbd6bf9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
release: { types: [published] }
workflow_dispatch:

jobs:
npmjs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
registry-url: "https://registry.npmjs.org"
- run: npm publish --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

github-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
registry-url: "https://npm.pkg.github.com"
- name: scope package name as required by GHPR
run: npm init -y --scope ${{ github.repository_owner }}
- run: npm publish --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
docker-compose.override.yml
docs/build
/docker-compose.override.yml
/docs/build

# npm
/bats-*.tgz
# we don't have any deps; un-ignore if that changes
/package-lock.json

0 comments on commit bbd6bf9

Please sign in to comment.