diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 830c135..ea65c10 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -6,9 +6,6 @@ on: jobs: build: runs-on: ubuntu-latest - permissions: - contents: read - packages: write env: S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY: ${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY }} S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY: ${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY }} @@ -100,9 +97,6 @@ jobs: needs: build runs-on: ubuntu-latest if: ${{ !endsWith(needs.build.outputs.project_version, '-SNAPSHOT') && github.ref == 'refs/heads/main' }} - permissions: - contents: read - packages: write env: S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY: ${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY }} S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY: ${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY }} @@ -133,7 +127,7 @@ jobs: runs-on: ubuntu-latest if: ${{ !endsWith(needs.build.outputs.project_version, '-SNAPSHOT') && github.ref == 'refs/heads/main' }} permissions: - contents: read + contents: write packages: write env: S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY: ${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY }} @@ -154,6 +148,7 @@ jobs: /home/runner/work key: ${{ needs.build.outputs.cache_key }} - name: Publish to GitHub Packages - run: |- - mvn --batch-mode -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dmaven.source.skip=true deploy -P deploy-github-packages - gh release upload v${{ needs.build.outputs.version }} target/*.jar + run: mvn --batch-mode -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dmaven.source.skip=true deploy -P deploy-github-packages + - name: Upload assets + run: cd ${{github.workspace}} && gh release upload v${{ needs.build.outputs.version }} target/*.jar + shell: bash