Skip to content

Commit bc0c32f

Browse files
committed
Add conditional steps for milestone/GA releases
1 parent 552bf45 commit bc0c32f

8 files changed

+45
-16
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
name: "CodeQL"
1313

1414
on:
15-
push:
16-
branches: [ main ]
15+
# push:
16+
# branches: [ main ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
1919
branches: [ main ]

.github/workflows/publish-documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
run: |
1919
git config user.name "rabbitmq-ci"
2020
git config user.email "[email protected]"
21-
./publish-documentation-to-github-pages.sh
21+
ci/publish-documentation-to-github-pages.sh

.github/workflows/release.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,21 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v3
12+
- name: Evaluate release type
13+
run: ci/evaluate-release.sh
1214
- name: Set up JDK
1315
uses: actions/setup-java@v3
1416
with:
1517
distribution: 'temurin'
1618
java-version: '8'
1719
cache: 'maven'
18-
server-id: ossrh
20+
server-id: ${{ env.maven_server_id }}
1921
server-username: MAVEN_USERNAME
2022
server-password: MAVEN_PASSWORD
2123
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2224
gpg-passphrase: MAVEN_GPG_PASSPHRASE
23-
- name: Release Stream Java Client
25+
- name: Release Stream Java Client (GA)
26+
if: ${{ env.ga_release == 'true' }}
2427
run: |
2528
git config user.name "rabbitmq-ci"
2629
git config user.email "[email protected]"
@@ -29,6 +32,18 @@ jobs:
2932
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
3033
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
3134
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
35+
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
36+
- name: Release Stream Java Client (Milestone/RC)
37+
if: ${{ env.ga_release != 'true' }}
38+
run: |
39+
git config user.name "rabbitmq-ci"
40+
git config user.email "[email protected]"
41+
ci/release-stream-java-client.sh
42+
env:
43+
MAVEN_USERNAME: ''
44+
MAVEN_PASSWORD: ${{ secrets.PACKAGECLOUD_TOKEN }}
45+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
46+
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
3247
- name: Package Stream Perf Test
3348
run: ci/package-stream-perf-test.sh
3449
env:
@@ -55,4 +70,4 @@ jobs:
5570
run: |
5671
git config user.name "rabbitmq-ci"
5772
git config user.email "[email protected]"
58-
./publish-documentation-to-github-pages.sh
73+
ci/publish-documentation-to-github-pages.sh

.github/workflows/test-3.11-alpha.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Test against RabbitMQ 3.11 alpha
33
on:
44
schedule:
55
- cron: '0 4 * * *'
6-
push:
7-
branches:
8-
- main
6+
# push:
7+
# branches:
8+
# - main
99
workflow_dispatch:
1010

1111
env:

.github/workflows/test-3.11-stable.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Test against RabbitMQ 3.11 stable
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
# push:
5+
# branches:
6+
# - main
77
workflow_dispatch:
88

99
env:
@@ -101,4 +101,4 @@ jobs:
101101
run: |
102102
git config user.name "rabbitmq-ci"
103103
git config user.email "[email protected]"
104-
./publish-documentation-to-github-pages.sh
104+
ci/publish-documentation-to-github-pages.sh

.github/workflows/test-3.12-alpha.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Test against RabbitMQ 3.12 alpha
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
# push:
5+
# branches:
6+
# - main
77
schedule:
88
- cron: '0 4 * * *'
99
workflow_dispatch:

ci/evaluate-release.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
source ./release-versions.txt
4+
5+
if [[ $RELEASE_VERSION == *[RCM]* ]]
6+
then
7+
echo "prerelease=true" >> $GITHUB_ENV
8+
echo "ga_release=false" >> $GITHUB_ENV
9+
echo "maven_server_id=packagecloud-rabbitmq-maven-milestones" >> $GITHUB_ENV
10+
else
11+
echo "prerelease=false" >> $GITHUB_ENV
12+
echo "ga_release=true" >> $GITHUB_ENV
13+
echo "maven_server_id=ossrh" >> $GITHUB_ENV
14+
fi

0 commit comments

Comments
 (0)