From 909a0b20acea8c6f04ebe3a413ed2562c7afa505 Mon Sep 17 00:00:00 2001 From: Nicolas Delsaux Date: Wed, 29 May 2024 10:18:13 +0200 Subject: [PATCH] oh come on, it shouldn't be that hard to have the correct token to update the very workflow file that started the whole thing ! --- .../on_workflow_dispatch_perform_maven_release.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/on_workflow_dispatch_perform_maven_release.yml b/.github/workflows/on_workflow_dispatch_perform_maven_release.yml index 33aa6cdb..de80b56f 100644 --- a/.github/workflows/on_workflow_dispatch_perform_maven_release.yml +++ b/.github/workflows/on_workflow_dispatch_perform_maven_release.yml @@ -11,6 +11,12 @@ on: required: true default: "0.2.2" + # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + jobs: build: @@ -70,7 +76,8 @@ jobs: - name: Build with Maven run: mvn --no-transfer-progress -B release:prepare release:perform -Prelease --file pom.xml env: - GITHUB_TOKEN: ${{ github.token }} +# Secret is changed to have the permission to update the workflow file + GITHUB_TOKEN: ${{ secrets.TOKEN_FOR_GITHUB }} - name: Get created tag name (for GitHuub release creation) id: tag run: echo "CREATED_GIT_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT