diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/build.yml | 24 | ||||
-rw-r--r-- | .github/workflows/release.yml | 34 |
2 files changed, 58 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3b5c147 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,24 @@ +name: Run Gradle Build +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v4.1.1 + + - name: Setup Java + uses: actions/setup-java@v4.0.0 + with: + distribution: temurin + java-version: 17 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Execute Gradle build + run: ./gradlew build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5f04e13 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Upload release files +on: + release: + types: [published] + +jobs: + build: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v4.1.1 + + - name: Setup Java + uses: actions/setup-java@v4.0.0 + with: + distribution: temurin + java-version: 17 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Execute Gradle build + run: ./gradlew clean build + + - uses: Kir-Antipov/mc-publish@v3.3 + with: + modrinth-id: r4AQF5mj + modrinth-token: ${{ secrets.MODRINTH_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} + files: 'build/-libs/*.jar' + loaders: forge + game-versions: 1.8.9 |