-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (57 loc) · 1.92 KB
/
ci.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
name: Continuous Integration
on:
pull_request:
branches: ['**', '!update/**', '!pr/**']
push:
branches: ['**', '!update/**', '!pr/**']
tags: [v*]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_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: [jvm]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: taiki-e/install-action@just
- uses: coursier/setup-action@main
with:
jvm: temurin@17
apps: mill
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Playwright
run: just setupPlaywright
- name: Test
run: mill project.test
publish:
if: github.repository == 'Quafadas/live-server-scala-cli-js' && contains(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Setup GPG secrets
run: |
gpg --version
cat <(echo "${{ secrets.PUBLISH_SECRET_KEY }}") | base64 --decode | gpg --batch --import
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.PUBLISH_USER }}:${{ secrets.PUBLISH_PASSWORD }}" --gpgArgs "--passphrase=${{ secrets.PUBLISH_SECRET_KEY_PASSWORD}},--batch,--yes,-a,-b,--pinentry-mode,loopback" --readTimeout 600000 --awaitTimeout 600000 --release true --signed true