Skip to content

Commit a43cdbe

Browse files
author
Théo LAGACHE
committed
Update auto-release.yml
1 parent c1889d6 commit a43cdbe

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

.github/workflows/auto-release.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,36 @@
11
name: Auto Release
22

33
on:
4-
push:
4+
pull_request:
5+
types: [closed]
56
branches:
67
- main
78

89
jobs:
910
release:
10-
name: Run release-it
11+
if: github.event.pull_request.merged == true
1112
runs-on: ubuntu-latest
1213
permissions:
1314
contents: write
1415

1516
steps:
16-
- name: Checkout repository
17-
uses: actions/checkout@v4
17+
- uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
2020

21-
- name: Install pnpm
22-
uses: pnpm/action-setup@v4
21+
- uses: pnpm/action-setup@v4
2322

24-
- name: Setup Node.js
25-
uses: actions/setup-node@v4
23+
- uses: actions/setup-node@v4
2624
with:
2725
node-version: "lts/*"
2826
cache: "pnpm"
2927

30-
- name: Install dependencies
31-
run: pnpm install --frozen-lockfile
28+
- run: pnpm install --frozen-lockfile
3229

33-
- name: Configure Git User
34-
run: |
35-
git config --global user.name 'github-actions[bot]'
36-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
30+
- run: git config --global user.name 'github-actions[bot]'
31+
- run: git config --global user.email 'github-actions[bot]@users.noreply.github.com'
3732

3833
- name: Run release-it
3934
env:
4035
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
run: pnpm exec release-it --ci
36+
run: pnpm exec release-it --ci --no-git.push --no-git.commit

0 commit comments

Comments
 (0)