diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 7586745..209f7ca 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -20,8 +20,7 @@ jobs: id: release with: release-type: maven - - + publish: if: ${{needs.release-please.outputs.release_created}} runs-on: ubuntu-latest @@ -43,11 +42,13 @@ jobs: push: if: ${{needs.release-please.outputs.release_created}} + permissions: + contents: read + packages: write + name: Publish to GitHub Packages Apache Maven uses: ./.github/workflows/maven.yaml secrets: inherit with: maven-goal: deploy - - - + needs: release-please diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index 3213bb9..6dc5425 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -15,6 +15,8 @@ permissions: jobs: build: name: build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4