Skip to content

Commit f64c78d

Browse files
authored
fix (#25)
1 parent 651e25d commit f64c78d

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

.github/workflows/release.yaml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,13 @@ jobs:
2424
contents: write
2525

2626
steps:
27-
- name: Checkout repository
28-
uses: actions/checkout@v4
29-
with:
30-
fetch-depth: 0
31-
ref: ${{ github.sha }}
32-
persist-credentials: false
3327

34-
- name: Force correct release branch on workflow sha
35-
run: |
36-
git checkout -B ${{ github.ref_name }} ${{ github.sha }}
28+
29+
- uses: actions/create-github-app-token@v1
30+
id: app-token
31+
with:
32+
app-id: ${{ vars.APP_ID }}
33+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
3734

3835
- name: Get GitHub App User ID
3936
id: get-user-id
@@ -45,6 +42,18 @@ jobs:
4542
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
4643
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
4744
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
with:
48+
fetch-depth: 0
49+
ref: ${{ github.sha }}
50+
token: ${{ steps.app-token.outputs.token }}
51+
persist-credentials: true
52+
53+
- name: Force correct release branch on workflow sha
54+
run: |
55+
git checkout -B ${{ github.ref_name }} ${{ github.sha }}
56+
4857
- name: Install the latest version of uv
4958
uses: astral-sh/setup-uv@v5
5059
with:
@@ -68,10 +77,8 @@ jobs:
6877
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
6978
run: >
7079
uv run semantic-release -vv version
71-
--commit --tag --changelog
72-
--skip-build --no-push --no-vcs-release
73-
74-
git push --set-upstream origin ${{ github.ref_name }}
80+
--commit --tag --changelog --push
81+
--skip-build --no-vcs-release
7582
7683
- name: Build and publish package distributions
7784
if: env.deploy

0 commit comments

Comments
 (0)