Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
odanado committed Mar 24, 2024
1 parent ef995ee commit 84ec177
Showing 1 changed file with 40 additions and 5 deletions.
45 changes: 40 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,44 @@ Designed to streamline the development workflow, this tool automates the creatio
$ git-pr-release-go --from main --to release/production
```

### Usage in GitHub Actions
### GitHub Actions Usage

For this CLI to function within GitHub Actions, it requires the following permissions:

- `contents: read`
- `pull-requests: write`

Here's a sample workflow:

```yaml
name: Create Release Pull Request
on:
push:
branches:
- main

jobs:
create-release-pr:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Setup git-pr-release-go
uses: KeisukeYamashita/[email protected]
with:
repository: odanado/git-pr-release-go
arch: x86_64
platform: "Linux"

- run: git-pr-release-go --from main --to release/production
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
#### Using GitHub Apps Tokens
To authenticate using a GitHub Apps token, incorporate [actions/create-github-app-token](https://github.com/actions/create-github-app-token) in your workflow.
```yaml
name: Create Release Pull Request
Expand All @@ -32,14 +69,12 @@ jobs:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}

- name: Download git-pr-release-go
- name: Setup git-pr-release-go
uses: KeisukeYamashita/[email protected]
with:
repository: odanado/git-pr-release-go
arch: x86_64
platform: "Linux"
env:
GH_TOKEN: ${{ github.token }}
platform: Linux

- run: git-pr-release-go --from main --to release/production
env:
Expand Down

0 comments on commit 84ec177

Please sign in to comment.