add deploy action #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Github Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
create_release: | |
name: 'Create release' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Get Version from Package.json | |
id: get_version | |
run: echo "::set-output name=version::$(node -p "require('./package.json').version")" | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.get_version.outputs.version }} # Use the version from package.json as the tag_name | |
release_name: ${{ steps.get_version.outputs.version }} # Use the version from package.json as the release_name | |
draft: false | |
prerelease: false |