-
Notifications
You must be signed in to change notification settings - Fork 7
76 lines (74 loc) · 3.9 KB
/
release.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
67
68
69
70
71
72
73
74
75
76
name: Maven Build for Release
# Performs a Maven release using JDK 11 when a new GitHub release has been published
on:
release:
types: [ published ]
jobs:
publish:
name: Maven Artifact Publisher (JDK ${{ matrix.java }} with ${{ matrix.build_property }})
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17 ]
build_property: [ "kakadu.version", "ignored.version" ]
steps:
- name: Check out source code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v2
- name: Install JDK ${{ matrix.java }}
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v1
with:
distribution: "temurin"
java-version: ${{ matrix.java }}
cache: maven
- name: Optionally, set artifact qualifier (for private builds that include Kakadu)
if: matrix.build_property == 'kakadu.version'
run: echo "ARTIFACT_QUALIFIER=${{ secrets.ARTIFACT_QUALIFIER }}" >> $GITHUB_ENV
- name: Optionally, login to Docker repository
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
if: env.DOCKER_USERNAME != null
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Install Kakadu SSH key
uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0
with:
ssh-private-key: ${{ secrets.KAKADU_PRIVATE_SSH_KEY }}
- name: Release with Maven (Public)
uses: samuelmeuli/action-maven-publish@201a45a3f311b2ee888f252ba9f4194257545709 # v1.4.0
if: env.ARTIFACT_QUALIFIER != '-ucla'
with:
gpg_private_key: ${{ secrets.BUILD_KEY }}
gpg_passphrase: ${{ secrets.BUILD_PASSPHRASE }}
nexus_username: ${{ secrets.SONATYPE_USERNAME }} # These are placeholders; we're publishing a Docker image
nexus_password: ${{ secrets.SONATYPE_PASSWORD }}
maven_args: >
-Drevision=${{ github.event.release.tag_name }}
-ntp -DskipNexusStagingDeployMojo=true
-D${{ matrix.build_property }}=${{ secrets.KAKADU_VERSION }}
-Ddocker.image=${{ secrets.DOCKER_REGISTRY_ACCOUNT}}cantaloupe${{ env.ARTIFACT_QUALIFIER }}:${{ github.event.release.tag_name }}
-Ddocker.registry.username=${{ secrets.DOCKER_USERNAME }}
-Ddocker.registry.account=${{ secrets.DOCKER_REGISTRY_ACCOUNT}}
-Ddocker.registry.password=${{ secrets.DOCKER_PASSWORD }}
# Temporary divergence of our build so we can add some IIIF Auth related patches
- name: Release with Maven (UCLA)
uses: samuelmeuli/action-maven-publish@201a45a3f311b2ee888f252ba9f4194257545709 # v1.4.0
if: env.ARTIFACT_QUALIFIER == '-ucla'
with:
gpg_private_key: ${{ secrets.BUILD_KEY }}
gpg_passphrase: ${{ secrets.BUILD_PASSPHRASE }}
nexus_username: ${{ secrets.SONATYPE_USERNAME }} # These are placeholders; we're publishing a Docker image
nexus_password: ${{ secrets.SONATYPE_PASSWORD }}
maven_args: >
-Drevision=${{ github.event.release.tag_name }}
-ntp -Dorg.slf4j.simpleLogger.log.net.sourceforge.pmd=error
-D${{ matrix.build_property }}=${{ secrets.KAKADU_VERSION }}
-DskipNexusStagingDeployMojo=true
-Ddocker.image=${{ secrets.DOCKER_REGISTRY_ACCOUNT}}cantaloupe${{ env.ARTIFACT_QUALIFIER }}:${{ github.event.release.tag_name }}
-Ddocker.registry.username=${{ secrets.DOCKER_USERNAME }}
-Ddocker.registry.account=${{ secrets.DOCKER_REGISTRY_ACCOUNT}}
-Ddocker.registry.password=${{ secrets.DOCKER_PASSWORD }}
-Dcantaloupe.commit.ref=${{ vars.DEV_COMMIT_REF }}
-Dcantaloupe.apply.patchfiles=${{ secrets.APPLY_PATCHFILES }}
-Dcantaloupe.version=dev