Deploy #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A deployment template that works out of the box | |
| # It supports these objectives: | |
| # - Deploy to CurseForge (Upload Job) [Secrets: CURSEFORGE_TOKEN] | |
| # - Deploy to Modrinth (Upload Job) [Secrets: MODRINTH_TOKEN] | |
| # - Deploy to Github Release (Upload Job) [Secrets: GITHUB_API_KEY] | |
| name: Deploy | |
| on: workflow_dispatch | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Grant Execute Permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Read gradle.properties | |
| uses: BrycensRanch/read-properties-action@v1 | |
| id: properties | |
| with: | |
| file: gradle.properties | |
| all: true | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Build | |
| uses: gradle/gradle-build-action@v3 | |
| with: | |
| arguments: build | |
| - name: Publish | |
| uses: gradle/gradle-build-action@v3 | |
| env: | |
| CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} | |
| MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| arguments: publishMod |