-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new: release will now create GH release
- Loading branch information
1 parent
7938ef5
commit efba4b7
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,9 @@ on: | |
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
|
||
# Use the semver as the job name | ||
name: "Release ${{ github.event.inputs.semver }}" | ||
runs-on: ubuntu-latest | ||
|
@@ -36,9 +39,21 @@ jobs: | |
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
npm version ${{ github.event.inputs.semver }} | ||
VERSION=`cat package.json | grep version | tr -d " " | cut -d":" -f2 | tr -d "\","` >> $GITHUB_ENV | ||
git push && git push --tags | ||
- name: Publish | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
|
||
- uses: actions/create-release@v1 | ||
name: Release | ||
id: create_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.VERSION }} | ||
release_name: Release ${{ env.VERSION }} | ||
draft: false | ||
prerelease: false |