fix checkout branch #18
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: CI | |
on: | |
push: | |
paths-ignore: | |
- docs/** | |
- cmake/** | |
- .vscode/** | |
- README.md | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
env: | |
CURSE_API_KEY: ${{ secrets.CURSE_API_KEY }} | |
strategy: | |
matrix: | |
java: [8] | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-tags: true | |
ref: mixed | |
- name: Setup Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
- name: Cache Gradle packages | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
${GITHUB_WORKSPACE}/.gradle | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Build | |
run: gradle build | |
- name: Upload to CurseForge | |
if: startsWith(github.ref, 'refs/tags/') | |
run: gradle curseforge | |
- name: Commit 'CurseForgeLatest.json' | |
if: always() | |
uses: EndBug/[email protected] | |
with: | |
add: "CurseForgeLatest.json" | |
message: " Updated CurseForge Version File" |