-
-
Notifications
You must be signed in to change notification settings - Fork 273
34 lines (34 loc) · 1017 Bytes
/
release-to-github.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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