Skip to content

Publish release to GitHub #20

Publish release to GitHub

Publish release to GitHub #20

Workflow file for this run

name: Publish release to GitHub
on:
workflow_run:
workflows: ["Version bump"]
branches: [version2]
types:
- completed
jobs:
version-bump:
name: Release to github releases
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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.GITHUB_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 v2 -m "Updated v2 tag with the latest code"
git push origin v2 --force