From 09deb950b2939027f1bf8405b38d97b06aaaf8e9 Mon Sep 17 00:00:00 2001 From: Chris Bono Date: Mon, 19 Sep 2022 13:21:34 -0500 Subject: [PATCH] [CI] Knocking kinks out of release process (5) --- .github/workflows/ci.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5ba27fa..03e672cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,19 @@ jobs: uses: gradle/gradle-build-action@v2 env: GRADLE_USER_HOME: ~/.gradle + - name: Run Gradle build + run: | + ./gradlew clean build --continue -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" + - name: Capture Test Results + if: failure() + uses: actions/upload-artifact@v3 + with: + name: test-results + path: '*/build/reports/tests/**/*.*' + retention-days: 3 + - name: Deploy artifacts + run: | + ./gradlew publishArtifact -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" -PossrhUsername="$OSSRH_TOKEN_USERNAME" -PossrhPassword="$OSSRH_TOKEN_PASSWORD" --stacktrace - id: extract_version name: Extract current version run: | @@ -50,7 +63,7 @@ jobs: permissions: contents: write timeout-minutes: 90 - #if: ${{ !endsWith(needs.build_and_deploy.outputs.project_version, '-SNAPSHOT') }} + if: ${{ !endsWith(needs.build_and_deploy.outputs.project_version, '-SNAPSHOT') }} env: REPO: ${{ github.repository }} BRANCH: ${{ github.ref_name }} @@ -65,16 +78,6 @@ jobs: with: java-version: '17' distribution: 'temurin' - - name: Wait for Artifactory Snapshot Artifacts - if: ${{ contains(needs.build_and_deploy.outputs.project_version, '-SNAPSHOT') }} - run: | - echo "Wait for artifacts of $REPO@$VERSION to appear on Artifactory." - until curl -f -s https://repo.spring.io/artifactory/snapshot/org/springframework/pulsar/spring-pulsar/$VERSION/ > /dev/null - do - sleep 30 - echo "." - done - echo "Artifacts for $REPO@$VERSION have been released to Artifactory." - name: Wait for Artifactory Artifacts if: ${{ contains(needs.build_and_deploy.outputs.project_version, '-RC') || contains(needs.build_and_deploy.outputs.project_version, '-M') }} run: | @@ -100,17 +103,16 @@ jobs: git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' - name: Tag Release - 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') }} + if: ${{ contains(needs.build_and_deploy.outputs.project_version, '-RC') || contains(needs.build_and_deploy.outputs.project_version, '-M') }} run: | echo "Tagging $REPO@$VERSION release." git tag v$VERSION git push --tags origin - name: Create Branch and Tag Release - 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') }} + if: ${{ !contains(needs.build_and_deploy.outputs.project_version, '-RC') && !contains(needs.build_and_deploy.outputs.project_version, '-M') }} run: | echo "Tagging $REPO@$VERSION and creating release branch." git checkout -b $VERSION - # git commit -am "[Release $VERSION] create release branch" git push origin $VERSION git tag v$VERSION git push --tags origin @@ -126,12 +128,10 @@ jobs: gh issue list \ --repo spring-projects-experimental/spring-pulsar \ --state all --json number,title,labels \ - --search label:aot-native \ + --search milestone:$VERSION \ --jq '{issues:map(select((.labels | length == 0) or (any(.labels[].name; startswith("automation/rlnotes")|not))) + {repo:"spring-projects-experimental/spring-pulsar"})}' \ > $RELEASE_NOTES_ISSUES - mustache $RELEASE_NOTES_ISSUES .github/rlnotes.mustache > $RELEASE_NOTES_FILE - gh release create $VERSION \ --draft \ --title "Spring Pulsar $VERSION" \