Skip to content

Commit

Permalink
added required permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dpbm committed Jan 27, 2025
1 parent 3f2b740 commit 0d285b8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/publish-test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@ jobs:
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
GPG_KEYID: ${{ secrets.GPG_KEYID }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
actor: ${{ github.actor }}
11 changes: 2 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ on:
type: string
description: 'Set as production to publish your artifacts'
default: 'test'
actor:
type: string
description: 'Your github username'
required: true
secrets:
GPG_KEY:
description: 'Your private GPG KEY'
Expand All @@ -20,9 +16,6 @@ on:
GPG_KEYID:
description: 'Your GPG KEY last 8 digits'
required: true
GH_TOKEN:
description: 'Your secret GITHUB_TOKEN'
required: true

jobs:
publish_github:
Expand Down Expand Up @@ -54,5 +47,5 @@ jobs:
if: ${{ inputs.env == 'production' }}
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_ACTOR: ${{ inputs.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ github.actor }}
6 changes: 4 additions & 2 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ jobs:

publish:
needs: release
permissions:
contents: read
packages: write

uses: ./.github/workflows/publish.yml
secrets:
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
GPG_KEYID: ${{ secrets.GPG_KEYID }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
env: 'production'
actor: ${{ github.actor }}

0 comments on commit 0d285b8

Please sign in to comment.