Skip to content

Commit 0705b83

Browse files
committed
ci: for now, use tag push to trigger release
1 parent e34c2f5 commit 0705b83

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

.github/workflows/release.yml

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

33
on:
4-
pull_request_target:
5-
types: [closed]
6-
branches:
7-
- main
8-
- 3.x
4+
push:
5+
tags:
6+
- "v*"
97

108
# Remove default permissions of GITHUB_TOKEN for security
119
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
1210
permissions: {}
1311

1412
jobs:
1513
release:
16-
if: github.repository == 'nuxt/nuxt' && github.event.pull_request.merged == true && (startsWith(github.event.pull_request.head.ref, 'v3.') || startsWith(github.event.pull_request.head.ref, 'v4.'))
1714
concurrency:
1815
group: release
1916
permissions:
@@ -41,19 +38,4 @@ jobs:
4138
- name: 🛠 Build and release project
4239
run: node scripts/release.ts
4340
env:
44-
TAG: ${{ startsWith(github.event.pull_request.head.ref, 'v3.') && '3x' || 'latest' }}
45-
46-
- name: 🏷️ Create tag
47-
env:
48-
TAG_NAME: ${{ github.event.pull_request.head.ref }}
49-
run: |
50-
git tag "$TAG_NAME"
51-
git push origin "$TAG_NAME"
52-
53-
- name: 🛳️ Create GitHub release
54-
env:
55-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56-
TAG_NAME: ${{ github.event.pull_request.head.ref }}
57-
RELEASE_NAME: ${{ github.event.pull_request.head.ref }}
58-
BODY: ${{ github.event.pull_request.body }}
59-
run: gh release create "$TAG_NAME" --title "$RELEASE_NAME" --notes "$BODY"
41+
TAG: ${{ startsWith(github.ref_name, 'v3.') && '3x' || 'latest' }}

0 commit comments

Comments
 (0)