diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..a14be99 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,31 @@ +name: publish +on: [ workflow_dispatch ] + +jobs: + release: + strategy: + matrix: + java: [ + 17, + 21 + ] + os: [ubuntu-22.04] + runs-on: ${{ matrix.os }} + steps: + - name: checkout repository + uses: actions/checkout@v4 + - name: validate gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: setup jdk ${{ matrix.java }} + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java }} + distribution: 'microsoft' + - name: make gradle wrapper executable + if: ${{ runner.os != 'Windows' }} + run: chmod +x ./gradlew + - name: build + run: ./gradlew build github modrinth --stacktrace + env: + GITHUB_TOKEN: ${{ secrets.GH_API_KEY }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 1869770..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Release - -on: [workflow_dispatch] - -jobs: - release: - - runs-on: ubuntu-latest - - container: - image: openjdk:17-jdk - options: --user root - - steps: - - uses: actions/checkout@v2.2.0 - - run: | - chmod +x ./gradlew - ./gradlew build github modrinth --stacktrace - env: - GITHUB_TOKEN: ${{ secrets.GH_API_KEY }} - MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} \ No newline at end of file