Skip to content

move ci to github, update docs / versions (#15) #9

move ci to github, update docs / versions (#15)

move ci to github, update docs / versions (#15) #9

Workflow file for this run

name: CI
on:
push:
branches: [master]
tags: [v*]
pull_request:
concurrency:
group: ${{ github.workflow }} @ ${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: sbt
- name: Start up Postgres
run: docker run --rm -d -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres:16-alpine
- name: Generate code
run: sbt '+core/Test/runMain com.anymindgroup.RunPgCodeGen'
- name: Test generated code
run: sbt '++2.13 Test/runMain com.anymindgroup.GeneratedCodeTest; ++3.3 Test/runMain com.anymindgroup.GeneratedCodeTest'
- name: Test sbt plugin
# for sbt < v2 which only supports scala 2.12
run: sbt ++2.12 scripted
release:
name: Release
runs-on: ubuntu-latest
continue-on-error: false
needs:
- test
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: sbt
- name: Release
run: sbt '++2.12 publishSigned; sonatypeCentralRelease'
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}