Skip to content

Commit

Permalink
new: release will now create GH release
Browse files Browse the repository at this point in the history
  • Loading branch information
aviadhahami committed Jul 20, 2023
1 parent 7938ef5 commit efba4b7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit efba4b7

Please sign in to comment.