-
Notifications
You must be signed in to change notification settings - Fork 18
41 lines (34 loc) · 1.32 KB
/
snapshot.yml
File metadata and controls
41 lines (34 loc) · 1.32 KB
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
name: snapshot
# To trigger this workflow manually, you can use the following curl command:
# curl -XPOST -u "USERNAME:PERSONAL_TOKEN" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/JavaVisRec/visrec-api/dispatches --data '{"event_type": "snapshot-pub"}'
on:
repository_dispatch:
types: [snapshot-pub]
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
#settings-path: ${{ github.workspace }} # location for the settings.xml
#server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
- name: Build with Maven
run: ./mvnw package
- name: Add private key to keyring
run: |
echo "${PRIVATE_KEY}" > private.key
gpg --import --batch private.key
env:
PRIVATE_KEY: ${{ secrets.GPG_SECRET_KEY }}
- name: Publish to repository
run: ./mvnw deploy -s settings.xml
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}