ci: update version after release #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: Build and Release Process | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'master' | |
repository_dispatch: | |
types: [build] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
mongodb-version: ['4.4', '5.0', '6.0', '7.0'] | |
java: [ '11', '17', '21' ] | |
steps: | |
- uses: actions/checkout@main | |
- name: Setup TimeZone | |
uses: szenius/set-timezone@master | |
with: | |
timezoneLinux: "Europe/Berlin" | |
timezoneMacos: "Europe/Berlin" | |
timezoneWindows: "W. Europe Standard Time" | |
- name: Set up JDK ${{ matrix.Java }} | |
uses: coursier/setup-action@main | |
with: | |
jvm: corretto:${{ matrix.Java }} | |
apps: sbt scala scalac | |
- name: Start MongoDB ${{ matrix.mongodb-version }} | |
uses: MongoCamp/mongodb-github-action@main | |
with: | |
mongodb-version: ${{ matrix.mongodb-version }} | |
- name: Run tests | |
run: | | |
timedatectl | |
sbt +test | |
release: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@main | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_ADMIN_TOKEN }} | |
- id: install-secret-key | |
name: Install gpg secret key | |
run: cat <(echo -e "${{ secrets.PGP_SECRET_KEY }}") | gpg --batch --import | |
- name: Install pnpm | |
uses: pnpm/action-setup@master | |
with: | |
version: 8 | |
- name: Set up JDK | |
uses: coursier/setup-action@main | |
with: | |
jvm: corretto:17 | |
apps: sbt scala scalac | |
- name: Release | |
env: | |
GITHUB_USER: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GH_ADMIN_TOKEN }} | |
SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSWORD }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET_KEY }} | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "MongoCamp CI" | |
sbt ci-release |