diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 16c2a95..337b870 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,7 +37,7 @@ jobs: with: arguments: assemble env: - JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JRELEASER_GITHUB_TOKEN: ${{ secrets.GH_PAT }} - name: Upload artifacts uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0 @@ -73,7 +73,7 @@ jobs: with: arguments: release -PartifactsDir=artifacts -PskipArchiveResolver env: - JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JRELEASER_GITHUB_TOKEN: ${{ secrets.GH_PAT }} - name: Upload JReleaser output if: always() diff --git a/README.md b/README.md index fa8ffe5..b4a6a79 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ The notable parts of the `build` job are, that we set the toolchain to `stable` with: arguments: assemble env: - JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JRELEASER_GITHUB_TOKEN: ${{ secrets.GH_PAT }} - name: Upload artifacts uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3.1.0 @@ -219,9 +219,11 @@ The `release` job very simple, it will download the artifacts folder and uses th with: arguments: release -PartifactsDir=artifacts -PskipArchiveResolver env: - JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JRELEASER_GITHUB_TOKEN: ${{ secrets.GH_PAT }} ``` +> As we going to write to a different repository, we need to create a personal access token with the `repo` scope and add it to the GitHub secrets. The name is `GH_PAT`. + ## Release Now we are ready to release our project. We need to create a tag and push it to GitHub. I will use the `v0.1.0` tag for and push it to GitHub.