Skip to content

Commit

Permalink
Automate publishing to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeboot committed Jan 27, 2021
1 parent f99fb2e commit 0eadf68
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish new release

on:
release:
types: [ published ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.release.target_commitish }}
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: git config --global user.name "GitHub CD bot"
- run: git config --global user.email "[email protected]"
- run: npm version ${{ github.event.release.tag_name }}
- run: npm run build
# - run: npm test
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: git push
env:
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0eadf68

Please sign in to comment.