Publish release to GitHub #66
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: Publish release to GitHub | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["Version bump"] | |
branches: [master] | |
types: | |
- completed | |
jobs: | |
version-bump: | |
name: Release to github releases | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set env | |
run: echo "pkg_version=$(awk '/version/{gsub(/("|",)/,"",$2);print $2}' package.json)" >> $GITHUB_ENV | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
with: | |
tag_name: ${{ env.pkg_version }} | |
release_name: ${{ env.pkg_version }} | |
body: | | |
- | |
draft: true | |
prerelease: false | |
- name: Update v1 release with the latest code | |
run: | | |
git config user.name gkr-bot | |
git config user.email [email protected] | |
git tag -fa v1 -m "Updated v1 tag with the latest code" | |
git push origin v1 --force |