diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce452ec..a0e786e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -121,3 +121,28 @@ jobs: asset_path: ./build/libs/jsons.jar asset_name: jsons.jar asset_content_type: application/java-archive + publish-package: + needs: [build, publish-release, publish-pre] + if: ${{ always() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + # I probably don't need to rebuild, but I'm sick of CI stuff + - name: Build with Gradle + uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 + with: + arguments: -Pversion=${{ needs.build.outputs.version }} build + - name: Publish to GitHub Packages + uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 + with: + arguments: publish + env: + USERNAME: ${{ github.actor }} + TOKEN: ${{ secrets.GITHUB_TOKEN }}