Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎉 PR: New Release candidate #163

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 42 additions & 21 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Get the previous release version
id: old_version
run: |
export MVN_OLD_VERSION=$(node -pe "require('./website/package.json').version")
echo "::set-output name=previous_version::$MVN_OLD_VERSION"

- name: Update pre-release version
run: yarn prerelease

Expand All @@ -46,13 +52,18 @@ jobs:
export MVN_VERSION=$(node -pe "require('./website/package.json').version")
echo "::set-output name=version::$MVN_VERSION"

- name: Generate Change log
if: steps.version.outputs.version != null
run: |
yarn changelog --from ${{ steps.old_version.outputs.previous_version }} --next-version v${{ steps.version.outputs.version }} > CHANGELOG.md

- name: Upload updated version related files to artifacts
uses: actions/upload-artifact@v3
with:
name: target
path: |
${{ github.workspace }}/.yarn
${{ github.workspace }}/lerna.json
${{ github.workspace }}/CHANGELOG.md
${{ github.workspace }}/website/package.json

pre-release-snapshot:
Expand All @@ -63,12 +74,6 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Setup Node v16
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'

- name: Install Java and Maven
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -109,6 +114,7 @@ jobs:
name: target
path: |
${{ github.workspace }}/lerna.json
${{ github.workspace }}/CHANGELOG.md
${{ github.workspace }}/website/package.json
${{ github.workspace }}/core-java/target
${{ github.workspace }}/core-java/pom.xml
Expand All @@ -123,11 +129,6 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'

- name: Install Java and Maven
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -168,11 +169,12 @@ jobs:
name: target
path: |
${{ github.workspace }}/lerna.json
${{ github.workspace }}/CHANGELOG.md
${{ github.workspace }}/website/package.json
${{ github.workspace }}/core-java/target
${{ github.workspace }}/core-java/pom.xml

push-pom-tag:
push-pom:
runs-on: ubuntu-latest
needs:
- prepare-pre-release
Expand Down Expand Up @@ -203,6 +205,7 @@ jobs:
add: |
core-java/pom.xml
lerna.json
CHANGELOG.md
website/package.json
message: |
chore(Internal): :bookmark: released latest version to maven central
Expand All @@ -212,11 +215,29 @@ jobs:
default_author: user_info
commit: --no-verify

- name: Create and Push Tag
uses: EndBug/add-and-commit@v9
with:
tag: 'v${{ needs.prepare-pre-release.outputs.new-version }} --force'
message: 🎉 Pre-release released to Maven central [skip ci]
default_author: user_info
push: true
tag_push: '--force'
github-pre-release:
runs-on: ubuntu-latest
needs:
- prepare-pre-release
- push-pom

steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ env.PUSH_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
with:
tag_name: v${{ needs.prepare-pre-release.outputs.new-version }}
name: Release Candidate Version ${{ needs.prepare-pre-release.outputs.new-version }}
prerelease: true
draft: false
body_path: CHANGELOG.md
discussion_category_name: Announcements
generate_release_notes: false
files: |
core-java/target/*.jar
core-java/target/*.pom
25 changes: 2 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:
with:
name: target
path: |
${{ github.workspace }}/.yarn
${{ github.workspace }}/lerna.json
${{ github.workspace }}/CHANGELOG.md
${{ github.workspace }}/website/package.json
Expand All @@ -75,12 +74,6 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Setup Node v16
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'

- name: Install Java and Maven
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -136,11 +129,6 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'

- name: Install Java and Maven
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -186,7 +174,7 @@ jobs:
${{ github.workspace }}/core-java/target
${{ github.workspace }}/core-java/pom.xml

push-pom-tag:
push-pom:
runs-on: ubuntu-latest
needs:
- prepare-release
Expand Down Expand Up @@ -227,20 +215,11 @@ jobs:
default_author: user_info
commit: --no-verify

- name: Create and Push Tag
uses: EndBug/add-and-commit@v9
with:
tag: 'v${{ needs.prepare-release.outputs.new-version }} --force'
message: 🎉 Released v${{ needs.prepare-release.outputs.new-version }} to Maven central [skip ci]
default_author: user_info
push: true
tag_push: '--force'

github-release:
runs-on: ubuntu-latest
needs:
- prepare-release
- push-pom-tag
- push-pom

steps:
- name: Check out Git repository
Expand Down