Skip to content

Commit f9de385

Browse files
committed
ci: migrate release workflow to push trigger
1 parent e74ca0c commit f9de385

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
name: release
22

33
on:
4-
pull_request_target:
5-
types: [closed]
6-
branches:
7-
- main
4+
push:
5+
tags:
6+
- "v*"
87

98
# Remove default permissions of GITHUB_TOKEN for security
109
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
1110
permissions: {}
1211

1312
jobs:
1413
release:
15-
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'v')
1614
concurrency:
1715
group: release
1816
permissions:
@@ -37,17 +35,3 @@ jobs:
3735

3836
- name: 📦 Release
3937
run: node ./scripts/release.mjs
40-
41-
- name: 🏷️ Create tag
42-
run: |
43-
TAG_NAME=${{ github.event.pull_request.head.ref }}
44-
git tag $TAG_NAME
45-
git push origin $TAG_NAME
46-
47-
- name: 🛳️ Create GitHub release
48-
run: gh release create $TAG_NAME --title "$RELEASE_NAME" --notes "$BODY"
49-
env:
50-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
TAG_NAME: ${{ github.event.pull_request.head.ref }}
52-
RELEASE_NAME: ${{ github.event.pull_request.head.ref }}
53-
BODY: ${{ github.event.pull_request.body }}

0 commit comments

Comments
 (0)