|
| 1 | +name: Release MacOS x64 Version to itch.io |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + git-tag: |
| 7 | + description: 'The git tag which which is used for the release' |
| 8 | + required: true |
| 9 | + default: 1.0.2 |
| 10 | + |
| 11 | +jobs: |
| 12 | + release-macos_x64: |
| 13 | + runs-on: macos-13 |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + with: |
| 17 | + ref: master |
| 18 | + fetch-depth: 0 |
| 19 | + - name: Fetch Git Tags |
| 20 | + run: git fetch --all --tags --prune |
| 21 | + - name: Git Checkout Tag |
| 22 | + run: git checkout tags/${{github.event.inputs.git-tag}} -b release/${{github.event.inputs.git-tag}} |
| 23 | + - uses: graalvm/setup-graalvm@v1 |
| 24 | + with: |
| 25 | + java-version: '21' |
| 26 | + distribution: 'graalvm' |
| 27 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 28 | + - name: Maven Build |
| 29 | + run: mvn clean install -Pnative |
| 30 | + - name: Download itch.io Butler |
| 31 | + run: curl -L -o butler.zip https://broth.itch.ovh/butler/darwin-amd64/LATEST/archive/default |
| 32 | + - name: Unzip itch.io Butler |
| 33 | + run: unzip butler.zip |
| 34 | + - name: Make Executable |
| 35 | + run: chmod +x butler |
| 36 | + - name: Create release Folder |
| 37 | + run: mkdir nibbles-clone-v${{github.event.inputs.git-tag}} |
| 38 | + - name: Create data Folder |
| 39 | + run: mkdir nibbles-clone-v${{github.event.inputs.git-tag}}/data |
| 40 | + - name: Copy Assets to release Folder |
| 41 | + run: cp -R data/ nibbles-clone-v${{github.event.inputs.git-tag}}/data |
| 42 | + - name: Copy Binaries to release Folder |
| 43 | + run: cp target/nibbles-clone nibbles-clone-v${{github.event.inputs.git-tag}} |
| 44 | + |
| 45 | + - name: list directory |
| 46 | + run: | |
| 47 | + ls -lha |
| 48 | + cd nibbles-clone-v${{github.event.inputs.git-tag}} |
| 49 | + ls -lha |
| 50 | + cd data |
| 51 | + ls -lha |
| 52 | +
|
| 53 | + - name: Zip release folder |
| 54 | + run: zip -R nibbles-clone-v${{github.event.inputs.git-tag}}.zip nipples-clone-v${{github.event.inputs.git-tag}} |
| 55 | + - name: Deploy to itch.io |
| 56 | + env: |
| 57 | + BUTLER_API_KEY: ${{secrets.BUTLER_API_KEY}} |
| 58 | + run: ./butler push nipples-clone-v${{github.event.inputs.git-tag}}.zip mwttg/nibbles-clone:macos --userversion ${{github.event.inputs.git-tag}} |
0 commit comments