Versino udpates #40
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: Compile, Test, Publish | |
on: | |
pull_request: | |
branches: ['**', '!update/**', '!pr/**'] | |
push: | |
branches: ['**', '!update/**', '!pr/**'] | |
tags: [v*, doc_*] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OPEN_AI_API_TOKEN: ${{ secrets.OPEN_AI_API_TOKEN }} | |
concurrency: | |
group: ${{ github.workflow }} @ ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build and Test | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
scala: [3] | |
java: [temurin@17] | |
project: [js, jvm, native] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout current branch (full) | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: coursier/setup-action@main | |
with: | |
jvm: temurin@17 | |
apps: mill | |
- name: Check format | |
run: mill mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources | |
- name: Compile All | |
run: mill api.__.compile && mill site.compile | |
- name: Test Api | |
if: matrix.project == 'jvm' | |
run: mill api.__.test | |
- name: Test Agentic | |
if: matrix.project == 'jvm' | |
run: mill agentic.test | |
publish: | |
if: github.repository == 'Quafadas/dairect-democracy' && startsWith(github.ref, 'refs/tags/v') | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- uses: coursier/setup-action@main | |
with: | |
jvm: temurin@17 | |
apps: mill | |
- name: Setup GPG secrets | |
run: | | |
gpg --version | |
cat <(echo "${{ secrets.PGP_SECRET }}") | base64 --decode | gpg --batch --import --no-tty --yes | |
gpg --list-secret-keys --keyid-format LONG | |
- name: Publish to Maven Central | |
run: mill -i mill.scalalib.PublishModule/publishAll __.publishArtifacts --sonatypeUri https://s01.oss.sonatype.org/service/local --sonatypeCreds "${{ secrets.SONATYPE_USERNAME }}:${{ secrets.SONATYPE_PASSWORD }}" --gpgArgs "--passphrase=${{ secrets.PGP_PASSPHRASE}},--batch,--yes,-a,-b,--pinentry-mode,loopback" --readTimeout 2400000 --awaitTimeout 2400000 --release true --signed true |