[CI] Knocking kinks out of release process
This commit is contained in:
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
@@ -38,19 +38,6 @@ 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: |
|
||||
@@ -115,17 +102,17 @@ jobs:
|
||||
- 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') }}
|
||||
run: |
|
||||
echo "Tagging $REPO@$VERSION release."
|
||||
git tag $VERSION
|
||||
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, '-RC') && !contains(needs.build_and_deploy.outputs.project_version, '-M') }}
|
||||
run: |
|
||||
echo "Tagging $REPO@$VERSION and creating release branch."
|
||||
echo "Tagging $REPO/$VERSION and creating release branch."
|
||||
git checkout -b $VERSION
|
||||
git commit -am "[Release $VERSION] create release branch"
|
||||
# git commit -am "[Release $VERSION] create release branch"
|
||||
git push origin $VERSION
|
||||
git tag $VERSION
|
||||
git tag v$VERSION
|
||||
git push --tags origin
|
||||
- name: Install Tooling
|
||||
run: |
|
||||
|
||||
53
.github/workflows/github-release.yml
vendored
53
.github/workflows/github-release.yml
vendored
@@ -1,53 +0,0 @@
|
||||
name: Github Release
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
releaseVersion:
|
||||
description: 'Version to release'
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
GH_ACTIONS_REPO_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
github-release:
|
||||
if: github.repository == 'spring-projects-experimental/spring-pulsar'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: checkout-source
|
||||
name: Checkout Source Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
|
||||
- name: Set up gradle
|
||||
uses: spring-io/spring-gradle-build-action@v1
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Install Tooling
|
||||
run: |
|
||||
curl -sSL https://github.com/cbroglie/mustache/releases/download/v1.2.2/mustache_1.2.2_linux_amd64.tar.gz | sudo tar -C /usr/local/bin/ --no-same-owner -xzv mustache
|
||||
- name: Create Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GH_ACTIONS_REPO_TOKEN}}
|
||||
RELEASE_NOTES_ISSUES: ${{runner.temp}}/release_notes_issues.json
|
||||
RELEASE_NOTES_FILE: ${{runner.temp}}/release_notes.md5
|
||||
run: |
|
||||
releaseVersion="${{ inputs.releaseVersion }}"
|
||||
|
||||
gh issue list \
|
||||
--repo spring-projects-experimental/spring-pulsar \
|
||||
--state all --json number,title,labels \
|
||||
--search label:aot-native \
|
||||
--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 $releaseVersion \
|
||||
--draft \
|
||||
--title "Spring Pulsar $releaseVersion" \
|
||||
--generate-notes \
|
||||
--notes-file $RELEASE_NOTES_FILE
|
||||
Reference in New Issue
Block a user