Skip to content

Commit da1b5a9

Browse files
RambokDevcharlesgauthereau
andauthored
fix: workflow
* fix * fix --------- Co-authored-by: charlesgauthereau <charles.gauthereau@soluce-technologies.com>
1 parent 8e5d6ee commit da1b5a9

File tree

2 files changed

+11
-61
lines changed

2 files changed

+11
-61
lines changed

.github/workflows/auto-release.yml

Lines changed: 10 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,8 @@
1-
#name: Auto Release bot
2-
#
3-
#on:
4-
# pull_request:
5-
# types: [ closed ]
6-
# branches:
7-
# - main
8-
#
9-
#jobs:
10-
# release:
11-
# if: github.event.pull_request.merged == true
12-
# runs-on: ubuntu-latest
13-
# permissions:
14-
# contents: write
15-
#
16-
# steps:
17-
# - uses: actions/create-github-app-token@v1
18-
# id: app-token
19-
# with:
20-
# app-id: ${{ vars.APP_ID }}
21-
# private-key: ${{ secrets.APP_PRIVATE_KEY }}
22-
#
23-
# - uses: actions/checkout@v4
24-
# with:
25-
# fetch-depth: 0
26-
# token: ${{ steps.app-token.outputs.token }}
27-
# ref: ${{ github.base_ref }}
28-
#
29-
# - uses: pnpm/action-setup@v4
30-
#
31-
# - uses: actions/setup-node@v4
32-
# with:
33-
# node-version: "lts/*"
34-
# cache: "pnpm"
35-
#
36-
# - run: pnpm install --frozen-lockfile
37-
#
38-
# - run: git config --global user.name 'github-actions[bot]'
39-
# - run: git config --global user.email 'github-actions[bot]@users.noreply.github.com'
40-
#
41-
# - name: Push tags
42-
# run: git push origin --tags
43-
#
44-
# - name: Run release-it
45-
# run: |
46-
# git pull origin main
47-
# pnpm exec release-it --ci
48-
# env:
49-
# GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
50-
51-
521
name: Auto Release bot
532

543
on:
554
pull_request:
56-
types: [closed]
5+
types: [ closed ]
576
branches:
587
- main
598

@@ -89,17 +38,18 @@ jobs:
8938
- run: git config --global user.name 'github-actions[bot]'
9039
- run: git config --global user.email 'github-actions[bot]@users.noreply.github.com'
9140

92-
- name: Bump version and tag
93-
run: pnpm exec release-it --ci --no-github
41+
- name: Run release-it
42+
run: |
43+
git pull origin main
44+
pnpm exec release-it --ci
9445
env:
9546
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
9647

97-
- name: Push commits and tags
48+
- name: Convert release to draft
9849
run: |
99-
git push origin main
100-
git push origin --tags
101-
102-
- name: Create GitHub release
103-
run: pnpm exec release-it --ci --only-github
50+
RELEASE_ID=$(gh release view v$(jq -r .version package.json) --repo $GITHUB_REPOSITORY --json id -q .id)
51+
gh release edit $RELEASE_ID --draft --repo $GITHUB_REPOSITORY
10452
env:
10553
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
54+
55+

.release-it.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"github": {
33
"release": true,
4-
"draft": true,
4+
"draft": false,
55
"tokenRef": "GITHUB_TOKEN"
66
},
77
"git": {

0 commit comments

Comments
 (0)