Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add custom GH_PAT #3

Merged
merged 1 commit into from
Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down