Update github_release.yml #4
This file contains 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
name: Publish Minecraft Mod Release | |
on: | |
push: | |
branches: | |
- mc/1.20.1 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/settings.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set executable permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Build Project | |
run: ./gradlew build | |
env: | |
JAVA_HOME: ${{ env.JAVA_HOME }} | |
- name: Run Gradle githubRelease | |
run: ./gradlew githubRelease | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB }} |