run setup graalvm and setup clojure in bash #15
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
| on: | ||
| push: | ||
| tags: | ||
| - "v*.*.*" | ||
| permissions: | ||
| contents: write | ||
| jobs: | ||
| build: | ||
| strategy: | ||
| matrix: | ||
| config: | ||
| - name: mobdap.jar | ||
| os: ubuntu-24.04 | ||
| profile: jar | ||
| - name: mobdap-linux-amd64 | ||
| os: ubuntu-24.04 | ||
| profile: unix | ||
| - name: mobdap-linux-arm64 | ||
| os: ubuntu-24.04-arm | ||
| profile: unix | ||
| - name: mobdap-macos-amd64 | ||
| os: macos-13 | ||
| profile: unix | ||
| - name: mobdap-macos-arm64 | ||
| os: macos-latest | ||
| profile: unix | ||
| - name: mobdap-windows-amd64 | ||
| os: windows-latest | ||
| profile: windows | ||
| runs-on: ${{ matrix.config.os }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: setup graalvm | ||
| uses: graalvm/setup-graalvm@v1 | ||
| shell: bash | ||
| with: | ||
| distribution: 'graalvm-community' | ||
| java-version: '24' | ||
| - name: setup clojure | ||
| uses: DeLaGuardo/[email protected] | ||
| shell: bash | ||
| with: | ||
| lein: 2.11.2 | ||
| - name: build ${{ matrix.config.name }} | ||
| if: matrix.config.profile == 'jar' | ||
| run: | | ||
| VERSION=${GITHUB_REF_NAME#v} | ||
| lein set-version $VERSION | ||
| lein uberjar | ||
| - name: build ${{ matrix.config.name }} | ||
| if: matrix.config.profile != 'jar' | ||
| shell: bash | ||
| run: | | ||
| VERSION=${GITHUB_REF_NAME#v} | ||
| lein set-version $VERSION | ||
| lein native-image | ||
| - name: move jar ${{ matrix.config.name }} | ||
| if: matrix.config.profile == 'jar' | ||
| run: | | ||
| mv target/uberjar/mobdap-*-standalone.jar ${{ matrix.config.name }} | ||
| - name: "upload jar: ${{ matrix.config.name }}" | ||
| if: matrix.config.profile == 'jar' | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: ${{ matrix.config.name }} | ||
| - name: "compress unix: ${{ matrix.config.name }}" | ||
| if: matrix.config.profile == 'unix' | ||
| run: | | ||
| tar -czvf ${{ matrix.config.name }}.tar.gz target/native-image/mobdap* | ||
| - name: "upload unix: ${{ matrix.config.name }}" | ||
| if: matrix.config.profile == 'unix' | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: ${{ matrix.config.name }}.tar.gz | ||
| - name: "compress windows: ${{ matrix.config.name }}" | ||
| if: matrix.config.profile == 'windows' | ||
| run: | | ||
| Compress-Archive -Path target/native-image/mobdap* -Destination ${{ matrix.config.name }}.zip | ||
| - name: "upload windows: ${{ matrix.config.name }}" | ||
| if: matrix.config.profile == 'windows' | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: ${{ matrix.config.name }}.zip | ||