Publish release #59
Workflow file for this run
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: Publish release | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| upload: | |
| name: Upload | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macOS-latest] | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Cached Konan | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.konan | |
| key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
| restore-keys: ${{ runner.os }}-konan- | |
| - name: Cached Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.gradle | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
| restore-keys: ${{ runner.os }}-gradle- | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 21 | |
| distribution: 'adopt' | |
| - name: Check | |
| run: ./gradlew check | |
| - name: Publish Linux | |
| if: matrix.os == 'ubuntu-latest' | |
| shell: bash | |
| run: ./gradlew publishLinuxX64PublicationToMavenLocal | |
| - name: Publish MacOS | |
| if: matrix.os == 'macOS-latest' | |
| shell: bash | |
| run: ./gradlew publishToMavenLocal | |
| - name: Copy artifact files | |
| run: | | |
| mkdir -p maven-local/release | |
| cp -r ~/.m2/repository/* maven-local/release | |
| - name: Upload linux artifacts | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-linux | |
| path: | | |
| maven-local | |
| !maven-local/**/maven-metadata-local.xml | |
| - name: Upload macos artifacts | |
| if: matrix.os == 'macOS-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-macos | |
| path: | | |
| maven-local | |
| !maven-local/**/maven-metadata-local.xml |