Skip to content

Commit 09deb95

Browse files
committed
[CI] Knocking kinks out of release process (5)
1 parent e7afb3f commit 09deb95

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@ jobs:
3838
uses: gradle/gradle-build-action@v2
3939
env:
4040
GRADLE_USER_HOME: ~/.gradle
41+
- name: Run Gradle build
42+
run: |
43+
./gradlew clean build --continue -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD"
44+
- name: Capture Test Results
45+
if: failure()
46+
uses: actions/upload-artifact@v3
47+
with:
48+
name: test-results
49+
path: '*/build/reports/tests/**/*.*'
50+
retention-days: 3
51+
- name: Deploy artifacts
52+
run: |
53+
./gradlew publishArtifact -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" -PossrhUsername="$OSSRH_TOKEN_USERNAME" -PossrhPassword="$OSSRH_TOKEN_PASSWORD" --stacktrace
4154
- id: extract_version
4255
name: Extract current version
4356
run: |
@@ -50,7 +63,7 @@ jobs:
5063
permissions:
5164
contents: write
5265
timeout-minutes: 90
53-
#if: ${{ !endsWith(needs.build_and_deploy.outputs.project_version, '-SNAPSHOT') }}
66+
if: ${{ !endsWith(needs.build_and_deploy.outputs.project_version, '-SNAPSHOT') }}
5467
env:
5568
REPO: ${{ github.repository }}
5669
BRANCH: ${{ github.ref_name }}
@@ -65,16 +78,6 @@ jobs:
6578
with:
6679
java-version: '17'
6780
distribution: 'temurin'
68-
- name: Wait for Artifactory Snapshot Artifacts
69-
if: ${{ contains(needs.build_and_deploy.outputs.project_version, '-SNAPSHOT') }}
70-
run: |
71-
echo "Wait for artifacts of $REPO@$VERSION to appear on Artifactory."
72-
until curl -f -s https://repo.spring.io/artifactory/snapshot/org/springframework/pulsar/spring-pulsar/$VERSION/ > /dev/null
73-
do
74-
sleep 30
75-
echo "."
76-
done
77-
echo "Artifacts for $REPO@$VERSION have been released to Artifactory."
7881
- name: Wait for Artifactory Artifacts
7982
if: ${{ contains(needs.build_and_deploy.outputs.project_version, '-RC') || contains(needs.build_and_deploy.outputs.project_version, '-M') }}
8083
run: |
@@ -100,17 +103,16 @@ jobs:
100103
git config user.name 'github-actions[bot]'
101104
git config user.email 'github-actions[bot]@users.noreply.github.com'
102105
- name: Tag Release
103-
if: ${{ contains(needs.build_and_deploy.outputs.project_version, '-SNAPSHOT') || contains(needs.build_and_deploy.outputs.project_version, '-RC') || contains(needs.build_and_deploy.outputs.project_version, '-M') }}
106+
if: ${{ contains(needs.build_and_deploy.outputs.project_version, '-RC') || contains(needs.build_and_deploy.outputs.project_version, '-M') }}
104107
run: |
105108
echo "Tagging $REPO@$VERSION release."
106109
git tag v$VERSION
107110
git push --tags origin
108111
- name: Create Branch and Tag Release
109-
if: ${{ !contains(needs.build_and_deploy.outputs.project_version, '-SNAPSHOT') && !contains(needs.build_and_deploy.outputs.project_version, '-RC') && !contains(needs.build_and_deploy.outputs.project_version, '-M') }}
112+
if: ${{ !contains(needs.build_and_deploy.outputs.project_version, '-RC') && !contains(needs.build_and_deploy.outputs.project_version, '-M') }}
110113
run: |
111114
echo "Tagging $REPO@$VERSION and creating release branch."
112115
git checkout -b $VERSION
113-
# git commit -am "[Release $VERSION] create release branch"
114116
git push origin $VERSION
115117
git tag v$VERSION
116118
git push --tags origin
@@ -126,12 +128,10 @@ jobs:
126128
gh issue list \
127129
--repo spring-projects-experimental/spring-pulsar \
128130
--state all --json number,title,labels \
129-
--search label:aot-native \
131+
--search milestone:$VERSION \
130132
--jq '{issues:map(select((.labels | length == 0) or (any(.labels[].name; startswith("automation/rlnotes")|not))) + {repo:"spring-projects-experimental/spring-pulsar"})}' \
131133
> $RELEASE_NOTES_ISSUES
132-
133134
mustache $RELEASE_NOTES_ISSUES .github/rlnotes.mustache > $RELEASE_NOTES_FILE
134-
135135
gh release create $VERSION \
136136
--draft \
137137
--title "Spring Pulsar $VERSION" \

0 commit comments

Comments
 (0)