Prepare for release 0.0.4 #27
Workflow file for this run
This file contains 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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: coursier/[email protected] | |
- uses: coursier/[email protected] | |
with: | |
jvm: zulu:17 | |
- name: Install libsodium (Linux) | |
if: runner.os == 'Linux' | |
run: sudo apt-get install -y libsodium-dev | |
- name: Update XCode version | |
if: runner.os == 'macOS' | |
# https://github.com/actions/virtual-environments/issues/2557 | |
run: | | |
sudo xcode-select -s "/Applications/Xcode_12.5.app" || sudo xcode-select -s "/Applications/Xcode_12.3.app" || ( ls /Applications; exit 1 ) | |
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/* | |
- name: Run tests | |
run: ./mill -i __.test | |
- name: Build and publish locally | |
run: ./mill -i __.publishLocal | |
- name: List published files | |
shell: bash | |
run: find ~/.ivy2/local | sort | |
- name: Copy artifacts | |
run: ./mill -i __.jniCopyFilesTo artifacts/ | |
- uses: actions/[email protected] | |
with: | |
name: artifacts | |
path: artifacts/ | |
if-no-files-found: error | |
retention-days: 2 | |
test-m1: | |
runs-on: ARM64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: coursier/[email protected] | |
- uses: coursier/setup-action@f883d08305acbc28e5e5363bf5ec086397627021 | |
with: | |
apps: "" | |
jvm: "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.1.0/graalvm-ce-java17-darwin-aarch64-22.1.0.tar.gz" | |
- name: Run tests | |
run: ./mill -i __.test | |
- name: Build and publish locally | |
run: ./mill -i __.publishLocal | |
- name: List published files | |
shell: bash | |
run: find ~/.ivy2/local | sort | |
- name: Copy artifacts | |
run: ./mill -i __.jniCopyFilesTo artifacts/ | |
- uses: actions/[email protected] | |
with: | |
name: artifacts | |
path: artifacts/ | |
if-no-files-found: error | |
retention-days: 2 | |
release: | |
needs: [test,test-m1] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: coursier/[email protected] | |
- uses: coursier/[email protected] | |
with: | |
jvm: zulu:17 | |
- name: Install libsodium (Linux) | |
if: runner.os == 'Linux' | |
run: sudo apt-get install -y libsodium-dev | |
- uses: actions/download-artifact@v2 | |
with: | |
name: artifacts | |
path: artifacts/ | |
- run: .github/scripts/gpg-setup.sh | |
shell: bash | |
env: | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
- name: Release | |
run: ./mill -i publishSonatype __.publishArtifacts | |
env: | |
PGP_PASSWORD: ${{ secrets.PGP_PASSPHRASE }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} |