-
Notifications
You must be signed in to change notification settings - Fork 28
34 lines (34 loc) · 1.04 KB
/
release.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_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