Skip to content

Commit 59eb91f

Browse files
RambokDevcharlesgauthereau
andauthored
fix: workflow
* fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix --------- Co-authored-by: charlesgauthereau <charles.gauthereau@soluce-technologies.com>
1 parent 64724d2 commit 59eb91f

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

.github/workflows/auto-release.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ jobs:
2424
with:
2525
fetch-depth: 0
2626
token: ${{ steps.app-token.outputs.token }}
27-
#ref: ${{ github.base_ref }}
28-
ref: main
27+
ref: ${{ github.base_ref }}
2928

3029
- uses: pnpm/action-setup@v4
3130

@@ -39,13 +38,24 @@ jobs:
3938
- run: git config --global user.name 'github-actions[bot]'
4039
- run: git config --global user.email 'github-actions[bot]@users.noreply.github.com'
4140

42-
- run: git fetch origin main:main
43-
- run: git checkout main
41+
- name: Fetch tags
42+
run: git fetch --tags
4443

45-
- name: Run release-it
46-
id: release_step
44+
# - name: Run release-it
45+
# id: release_step
4746
# run: |
4847
# git pull origin main
49-
run: pnpm exec release-it --ci
48+
# pnpm exec release-it --ci
49+
# env:
50+
# GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
51+
- name: Run release-it
52+
id: release_step
53+
run: |
54+
git pull origin main
55+
OUTPUT=$(pnpm exec release-it --ci)
56+
echo "$OUTPUT"
57+
# Extract the untagged draft release name
58+
DRAFT_TAG=$(echo "$OUTPUT" | grep -o 'releases/tag/[^ ]*' | sed 's|releases/tag/||')
59+
echo "draft_tag=$DRAFT_TAG" >> $GITHUB_OUTPUT
5060
env:
5161
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

.release-it.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"github": {
33
"release": true,
44
"draft": true,
5-
"tokenRef": "GITHUB_TOKEN"
5+
"tokenRef": "GITHUB_TOKEN",
6+
"update": true
67
},
78
"git": {
89
"commit": true,

0 commit comments

Comments
 (0)