-
-
Notifications
You must be signed in to change notification settings - Fork 117
57 lines (54 loc) · 1.84 KB
/
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
50
51
52
53
54
55
56
57
# This workflow builds a map using the base and branch commit of a PR and uploads
# the logs as an artifact that update-pr.yml uses to add back as a comment.
name: Publish a Snapshot
on:
push:
branches: [ main ]
workflow_dispatch:
inputs:
image_tags:
description: 'Extra docker image tags ("latest,test")'
required: true
default: 'latest,snapshot'
jobs:
snapshot:
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Cache data/sources
uses: ./.github/cache-sources-action
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'temurin'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- run: ./scripts/build-release.sh
- run: ./scripts/test-release.sh
- run: sha256sum planetiler-dist/target/*with-deps.jar
- run: md5sum planetiler-dist/target/*with-deps.jar
- name: 'Upload artifact'
uses: actions/upload-artifact@v3
with:
name: planetiler-build
path: planetiler-dist/target/*with-deps.jar
- name: Install GPG Private Key
run: |
echo -n "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | base64 --decode | gpg --batch --import
- run: ./scripts/push-release.sh
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE_TAGS: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.image_tags || 'latest,snapshot' }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}