Skip to content

feat: Action to release latest version on GitHub #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Sep 30, 2020
14 changes: 13 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish NPM package
name: Publish NPM package and Release on GitHub

on:
push:
Expand Down Expand Up @@ -36,3 +36,15 @@ jobs:
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}

- name: Create Release
id: create_release
uses: actions/create-release@v1
if: steps.check.outputs.versionChanged == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.check.outputs.releaseVersion }}
release_name: Release ${{ steps.check.outputs.releaseVersion }}
draft: false
prerelease: false