Skip to content

Commit

Permalink
Merge pull request #92 from MRoci/gh-actions
Browse files Browse the repository at this point in the history
add workflow to publish a release on NPM and on Github Release
  • Loading branch information
fonini authored Mar 31, 2021
2 parents 11f556f + deb2eeb commit b5c7a73
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: publish release

on:
push:
tags:
- '*'

jobs:
# publish on NPM registry
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
registry-url: https://registry.npmjs.org/
- name: Publish on NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# create gh release
gh-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Generate Changelog
uses: scottbrenner/generate-changelog-action@master
id: generate_changelog
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body: |
${{ steps.generate_changelog.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b5c7a73

Please sign in to comment.