-
Notifications
You must be signed in to change notification settings - Fork 9
51 lines (45 loc) · 2 KB
/
ci.yaml
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
# Copyright 2024 lbruun.net.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: CI workflow
on:
push:
# Only on push of commits, not push of tags (we have 'release' for that)
branches:
- "main"
pull_request:
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
server-id: maven-central # Value of <id> in <server> section of generated settings.xml
server-username: MAVEN_CENTRAL_USERNAME # env variable for username in <server> section of generated settings.xml
server-password: MAVEN_CENTRAL_PASSWORD # env variable for password in <server> section of generated settings.xml
gpg-private-key: ${{ secrets.MAVEN_CENTRAL_GPG_SECRET_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_CENTRAL_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Maven execution
run: .github/scripts/maven-execution.sh
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} # Must be the token "username", not the username for the UI
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} # Must be the token "password", not the password for the UI
MAVEN_CENTRAL_GPG_PASSPHRASE: ${{ secrets.MAVEN_CENTRAL_GPG_PASSPHRASE }}