Skip to content

Merge pull request #6 from MaciejG604/release-0.0.4 #29

Merge pull request #6 from MaciejG604/release-0.0.4

Merge pull request #6 from MaciejG604/release-0.0.4 #29

Workflow file for this run

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/cache-action@v6.3
- uses: coursier/setup-action@v1.2.0-M3
with:
jvm: zulu:17
- name: Install libsodium (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install -y libsodium-dev
- 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/upload-artifact@v2.2.4
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/cache-action@v6.3
- 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/upload-artifact@v2.2.4
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/cache-action@v6.3
- uses: coursier/setup-action@v1.2.0-M3
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 }}