initial packets #57
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: Gradle Build | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths-ignore: | |
| - "builds/**" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: github.actor != 'github-actions[bot]' | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: setup | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: permissions | |
| run: chmod +x gradlew | |
| - name: build | |
| run: ./gradlew --no-daemon build | |
| - name: copy jar to builds | |
| run: | | |
| mkdir -p builds | |
| cp build/libs/TuffX-United-0.0.1.jar builds/TuffX-United-0.0.1.jar | |
| - name: push jar | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| git add builds/TuffX-United-0.0.1.jar | |
| if git diff --cached --quiet; then | |
| echo "No build artifact changes to commit." | |
| exit 0 | |
| fi | |
| git commit -m "Update build artifact" | |
| git push |