Skip to content

Commit 260bb48

Browse files
authored
Adapt release workflow to recent GH changes (#784)
Similar to projectnessie/nessie#11691 and the ninja commits [1](projectnessie/nessie@9a7d255), [2](projectnessie/nessie@2b63e7f), [3](projectnessie/nessie@bddde70).
1 parent 2ef00ef commit 260bb48

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
GIT_TAG: v${{ github.event.inputs.releaseVersion }}
3434
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
3535
NEXT_VERSION: ${{ github.event.inputs.nextVersion }}
36+
permissions:
37+
contents: write
3638

3739
steps:
3840
- name: Check parameters
@@ -54,6 +56,7 @@ jobs:
5456
with:
5557
fetch-depth: '0'
5658
submodules: 'true'
59+
token: ${{ secrets.NESSIE_BUILDER }}
5760

5861
- name: Check commit status
5962
run: |
@@ -111,16 +114,7 @@ jobs:
111114

112115
- name: Push tag + branch
113116
run: |
114-
# Push directly using the remote repo URL, which includes the secret so this job can push to the repo
115-
UPSTREAM="https://${{ secrets.NESSIE_BUILDER }}@github.com/${GITHUB_REPOSITORY}.git"
116-
117-
# Move the default auth settings in ~/.gitconfig out of the way, so the git-push can use the token
118-
git config --rename-section http.https://github.com/ http.https://save.github.com/
119-
120-
git push --no-verify "${UPSTREAM}" HEAD:${GITHUB_REF} ${GIT_TAG}
121-
122-
# Move the default auth settings in ~/.gitconfig back
123-
git config --rename-section http.https://save.github.com/ http.https://github.com/
117+
git push --no-verify origin HEAD:main ${GIT_TAG}
124118
125119
- name: Prepare Release Notes
126120
id: prep_release

0 commit comments

Comments
 (0)