Skip to content

Commit

Permalink
[CI] Knocking kinks out of release process (5)
Browse files Browse the repository at this point in the history
  • Loading branch information
onobc committed Sep 19, 2022
1 parent e7afb3f commit 09deb95
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 }}
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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" \
Expand Down

0 comments on commit 09deb95

Please sign in to comment.