-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·76 lines (69 loc) · 2.07 KB
/
main_test_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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