Skip to content

Commit

Permalink
Merge pull request #50 from wiemanboy/feature/bot-auth
Browse files Browse the repository at this point in the history
UPDATE: use bot for all repo actions
  • Loading branch information
wiemanboy authored Oct 26, 2024
2 parents 1cd95da + 00faecb commit 0a6b64d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ template: |
## Changelog
$CHANGES
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-template: "- (#$NUMBER) $TITLE @$AUTHOR"
14 changes: 8 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install jq
run: sudo apt-get install jq
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Auth GitHub CLI
run: echo "GITHUB_TOKEN=${{steps.app-token.outputs.token}}" >> $GITHUB_ENV

- name: Get version from package.json
id: get_version
Expand Down Expand Up @@ -44,8 +50,6 @@ jobs:
- name: Draft release
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
name: ${{ github.event.repository.name }} v${{ env.VERSION }}
tag: ${{ env.VERSION }}
Expand All @@ -57,8 +61,6 @@ jobs:
```
- name: Publish Draft
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
run: |
existing_release=$(gh release view "${{ env.VERSION }}" --json id --jq '.id // empty')
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/create-github-app-token@v1
id: app-token
with:
Expand All @@ -42,9 +45,6 @@ jobs:
- name: Auth GitHub CLI
run: echo "GH_TOKEN=${{steps.app-token.outputs.token}}" >> $GITHUB_ENV

- name: Checkout
uses: actions/checkout@v4

- name: Get version from package.json
run: |
VERSION=$(jq -r '.version' package.json)
Expand Down

0 comments on commit 0a6b64d

Please sign in to comment.