Skip to content

Commit

Permalink
Create release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Feb 12, 2020
1 parent e53a0d7 commit b0a4de6
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release Published

on:
release:
types: [published]

jobs:
build:
name: Create Node.js Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1

- name: Generate package
id: generate_package
run: echo ::set-output name=FILE::$(npm pack)

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{github.event.release.upload_url}}
asset_path: ./${{ steps.generate_package.outputs.FILE }}
asset_name: ${{ steps.generate_package.outputs.FILE }}
asset_content_type: application/gzip

- name: Publish to npmjs
run: npm publish ${{ steps.generate_package.outputs.FILE }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit b0a4de6

Please sign in to comment.