Skip to content

ci: update version after release #47

ci: update version after release

ci: update version after release #47

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' ]
steps:
- uses: actions/checkout@v3.0.0
- name: Setup TimeZone
uses: szenius/set-timezone@v1.2
with:
timezoneLinux: "Europe/Berlin"
timezoneMacos: "Europe/Berlin"
timezoneWindows: "W. Europe Standard Time"
- name: Set up JDK ${{ matrix.Java }}
uses: actions/setup-java@v3.3.0
with:
distribution: 'corretto'
java-version: ${{ matrix.java }}
- name: Start MongoDB ${{ matrix.mongodb-version }}
uses: MongoCamp/mongodb-github-action@1.2.0
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@v4.1.0
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: Set up JDK
uses: coursier/setup-action@v1
with:
jvm: graalvm-java17:22.3.3
apps: sbt scala scalac
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- 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 "ci@mongocamp.dev"
git config --global user.name "MongoCamp CI"
sbt ci-release