Skip to content

Commit 195cec0

Browse files
committed
ci: use push of tag as release trigger
1 parent 30eb4a3 commit 195cec0

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 21 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.repository_owner == 'nuxt' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'v')
1614
concurrency:
1715
group: release
1816
permissions:
@@ -38,19 +36,4 @@ jobs:
3836
run: pnpm dev:prepare
3937

4038
- name: 🛠 Build and release project
41-
run: pnpm changelogen --publish
42-
43-
- name: 🏷️ Create tag
44-
env:
45-
TAG_NAME: ${{ github.event.pull_request.head.ref }}
46-
run: |
47-
git tag "$TAG_NAME"
48-
git push origin "$TAG_NAME"
49-
50-
- name: 🛳️ Create GitHub release
51-
env:
52-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
TAG_NAME: ${{ github.event.pull_request.head.ref }}
54-
RELEASE_NAME: ${{ github.event.pull_request.head.ref }}
55-
BODY: ${{ github.event.pull_request.body }}
56-
run: gh release create "$TAG_NAME" --title "$RELEASE_NAME" --notes "$BODY"
39+
run: pnpm publish

0 commit comments

Comments
 (0)