-
Notifications
You must be signed in to change notification settings - Fork 35
83 lines (73 loc) · 2.71 KB
/
release.yml
File metadata and controls
83 lines (73 loc) · 2.71 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
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
82
83
name: Publish package to the Maven Central Repository
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Publish to Central
uses: ./.github/actions/maven-build
with:
set-version: ${{ github.event.release.tag_name }}
build-command: install org.sonatype.central:central-publishing-maven-plugin:0.7.0:publish -P release
env:
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME_CENTRAL }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD_CENTRAL }}
RUNE_GPG_PRIVATE_KEY: ${{ secrets.RUNE_GPG_PRIVATE_KEY }}
RUNE_GPG_PASSPHRASE: ${{ secrets.RUNE_GPG_PASSPHRASE }}
wait-for-release:
needs: publish
runs-on: ubuntu-latest
steps:
- name: Poll for release availability
run: |
GROUP_ID="org/finos/rune"
VERSION="${{ github.event.release.tag_name }}"
MODULES=(
"rune-runtime"
"rune-lang"
"rune-ide"
"rune-maven-plugin"
"rune-testing"
"rune-tools"
"rune-xcore-plugin-dependencies"
)
echo "Polling for all modules in version $VERSION"
for i in {1..30}; do
ALL_OK=true
for ARTIFACT_ID in "${MODULES[@]}"; do
URL="https://repo1.maven.org/maven2/$GROUP_ID/$ARTIFACT_ID/$VERSION/$ARTIFACT_ID-$VERSION.jar"
if ! curl --silent --head --fail "$URL" > /dev/null; then
echo "Missing $ARTIFACT_ID-$VERSION.jar"
ALL_OK=false
else
echo "Found $ARTIFACT_ID-$VERSION.jar"
fi
done
if [ "$ALL_OK" = true ]; then
echo "All modules are available in Maven Central"
exit 0
fi
echo "Not all artifacts available yet... waiting 20s"
sleep 20
done
echo "Release not available after 10 minutes"
exit 1
backport-publish:
needs: wait-for-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Publish Rosetta Backport
uses: ./.github/actions/maven-build
with:
working-directory: rosetta-backport
set-version: ${{ github.event.release.tag_name }}
build-command: install org.sonatype.central:central-publishing-maven-plugin:0.7.0:publish -P release
env:
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
RUNE_GPG_PRIVATE_KEY: ${{ secrets.RUNE_GPG_PRIVATE_KEY }}
RUNE_GPG_PASSPHRASE: ${{ secrets.RUNE_GPG_PASSPHRASE }}