-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (72 loc) · 2.63 KB
/
publish-all-in-one.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
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
77
78
79
80
81
name: "Publish All Components"
on:
workflow_dispatch:
inputs:
version:
type: string
required: true
description: "The version that should be released."
branch:
type: string
required: false
default: "main"
description: "The branch which to publish. must exist in all repos!"
review-dependencies:
type: boolean
required: false
default: false
description: "If true, it will trigger IPLab review for restricted dependencies"
workflow_call:
inputs:
version:
type: string
required: true
description: "The version that should be released. "
branch:
type: string
required: false
default: "main"
description: "The branch which to publish. must exist in all repos!"
review-dependencies:
type: boolean
required: false
default: false
description: "If true, it will trigger IPLab review for restricted dependencies"
# these environment variables will be read by release-setup.sh
env:
VERSION: ${{ inputs.version }}
SOURCE_BRANCH: ${{ inputs.branch }}
jobs:
Publish-All-Components:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: eclipse-edc/.github/.github/actions/setup-build@main
- name: release setup
run: |
echo "Launch release setup on branch $SOURCE_BRANCH and version $VERSION"
./release-setup.sh
- name: request review for restricted DEPENDENCIES
if: ${{ inputs.review-dependencies }}
uses: eclipse-edc/.github/.github/actions/request-dependencies-review@main
with:
gitlab-token: ${{ secrets.GITLAB_API_TOKEN }}
- name: "Display project structure"
run: ./gradlew projects
- uses: eclipse-edc/.github/.github/actions/import-gpg-key@main
name: "Import GPG Key"
with:
gpg-private-key: ${{ secrets.ORG_GPG_PRIVATE_KEY }}
- name: "Publish all-in-one project"
env:
OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }}
OSSRH_USER: ${{ secrets.ORG_OSSRH_USERNAME }}
run: |-
cmd=""
if [[ $VERSION != *-SNAPSHOT ]]
then
cmd="closeAndReleaseSonatypeStagingRepository";
fi
echo "Publishing Version $VERSION to Sonatype"
./gradlew publishToSonatype ${cmd} --no-parallel -Pversion=$VERSION -Psigning.gnupg.executable=gpg -Psigning.gnupg.passphrase="${{ secrets.ORG_GPG_PASSPHRASE }}" \
-Dorg.gradle.internal.network.retry.max.attempts=5 -Dorg.gradle.internal.network.retry.initial.backOff=5000