-
Notifications
You must be signed in to change notification settings - Fork 16
49 lines (44 loc) · 1.42 KB
/
CI snapshot.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
name: CI snapshot
on:
push:
branches: [ '**' ]
workflow_run:
workflows: ["CI release"]
branches: [ '**' ]
types:
- completed
workflow_dispatch:
jobs:
build:
name: Upload Snapshot
runs-on: ubuntu-latest
steps:
# Checkout the source code of the project
- name: Checkout
uses: actions/checkout@v2
# Install the GPG secret key
- name: Step 2 - Import GPG Key
run: |
echo "${{ secrets.GPG_PUBLIC_KEY }}" | gpg --import
echo "${{ secrets.GPG_SECRET_KEY }}" | gpg --import --no-tty --batch --yes
env:
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
# Set up the jdk using version 11 of Adoptium Temurin
- name: Setup java 11 using Adoptium Temurin
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
# Deploy the snapshot
- name: Deploy
run: mvn deploy -ntp --batch-mode
env:
MAVEN_USERNAME: ${{ secrets.MVN_CENTRAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MVN_CENTRAL_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}