Repository navigation
feat: track crafts at MMOItems stations (#23) #72
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
| name: Build | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name != 'pull_request' }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| cache: maven | |
| - name: Fetch private dependencies | |
| env: | |
| GH_TOKEN: ${{ secrets.DEPS_TOKEN }} | |
| run: | | |
| mkdir -p libs | |
| gh release download v1 --repo JustinasLa/tfmc-deps --dir libs --clobber \ | |
| --pattern 'VotingPlugin-7.0.jar' \ | |
| --pattern 'musicalinstruments-2.5.jar' \ | |
| --pattern 'geiger_counter-1.1.3.jar' \ | |
| --pattern 'MMOCore-1.13.1.jar' \ | |
| --pattern 'MMOItems-6.10.1.jar' \ | |
| --pattern 'MythicLib-dist-1.7.1.jar' \ | |
| --pattern 'TLibs-1.0.jar' \ | |
| --pattern 'vehicleframework-1.1.11.jar' \ | |
| --pattern 'vfbuilders-1.0.0.jar' \ | |
| --pattern 'rpcharacters-1.1.7.jar' \ | |
| --pattern 'interactiblefurniture-0.1.3-BETA.jar' \ | |
| --pattern 'simplefactions-2.8.7.jar' \ | |
| --pattern 'advancedcrafting-1.1.7.jar' \ | |
| --pattern 'archeology-plugin-1.0.1.jar' \ | |
| --pattern 'marketblock-0.0.2.jar' \ | |
| --pattern 'games-0.1.1-api.jar' \ | |
| --pattern 'cooking-0.1.5-ALPHA-api.jar' | |
| - name: Verify private dependencies | |
| run: sha256sum -c libs/SHA256SUMS | |
| - name: Build | |
| run: mvn -B --no-transfer-progress clean package | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: activity-jar-${{ github.sha }} | |
| path: target/*.jar | |
| if-no-files-found: error | |
| retention-days: 90 | |
| publish: | |
| needs: build | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: publish-latest-release | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: activity-jar-${{ github.sha }} | |
| path: target | |
| # --clobber only replaces an asset with the same filename; a pom.xml | |
| # version bump changes the jar name, so old jars won't be pruned | |
| # automatically and must be removed from the release manually. | |
| - name: Publish latest release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| if gh release view latest >/dev/null 2>&1; then | |
| gh release upload latest target/*.jar --clobber | |
| else | |
| gh release create latest target/*.jar \ | |
| --title "Latest build" --notes "Auto-published from main" --latest=false | |
| fi |