Include only config information #96
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: Java CI | |
on: [ push ] | |
jobs: | |
resolve-versions: | |
name: "Resolve Versions" | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- run: sudo apt-get update && sudo apt-get install -y jo | |
- uses: actions/checkout@v4 | |
- id: set-matrix | |
run: ./resolveversions.sh >> $GITHUB_OUTPUT | |
build: | |
needs: resolve-versions | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.resolve-versions.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
- name: Build | |
run: ./buildsingle.sh "${{ matrix.mc }}" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: "buildAllJars-${{matrix.mc}}" | |
path: buildAllJars/*.jar | |
if-no-files-found: error | |
- name: Publish Release | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: MAVEN_PASS="${{ secrets.MAVEN_PASS }}" MAVEN_TYPE=production ./gradlew publish -PmcVer="${{ matrix.mc }}" --no-daemon | |
- name: Publish Snapshot | |
run: MAVEN_PASS="${{ secrets.MAVEN_PASS }}" ./gradlew publish -PmcVer="${{ matrix.mc }}" --no-daemon | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download All Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: buildAllJars | |
pattern: buildAllJars-* | |
merge-multiple: true | |
- name: Files | |
run: | | |
#!/bin/bash | |
ls -1 ./buildAllJars/*.jar | |
- name: Publish | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
#!/bin/bash | |
while read -r filename; do | |
curl --fail -X POST -H "Authorization: Bearer ${{ secrets.DEPLOY }}" -F "upload=@$filename" https://api.mrmelon54.com/v1/mc-upload/upload/infrastructury | |
done < <(find ./buildAllJars/ -name '*.jar' -type f) |