-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
61 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,25 +2,61 @@ name: Bump version for releases | |
description: "Call bumpversion" | ||
inputs: | ||
part: | ||
description: 'What kind of release is this?' | ||
description: "What kind of release is this?" | ||
required: true | ||
default: 'release' | ||
default: "release" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set git configs for bumpversion | ||
shell: bash | ||
run: | | ||
git config user.name 'Lance Release' | ||
git config user.email '[email protected]' | ||
- name: Create release version and tags | ||
working-directory: python | ||
shell: bash | ||
run: | | ||
cargo install cargo-bump | ||
cargo bump ${{ inputs.part }} | ||
- name: Synchronize rust version | ||
shell: bash | ||
run: | | ||
cargo install cargo-workspaces --version 0.2.44 | ||
cargo ws version --no-git-commit -y --exact --force 'lance*' ${{ inputs.part }} | ||
- name: Set git configs for bumpversion | ||
shell: bash | ||
run: | | ||
git config user.name 'Lance Release' | ||
git config user.email '[email protected]' | ||
- name: Create release version and tags | ||
working-directory: python | ||
shell: bash | ||
run: | | ||
cargo install cargo-bump | ||
cargo bump ${{ inputs.part }} | ||
- name: Synchronize rust version | ||
shell: bash | ||
run: | | ||
cargo install cargo-workspaces --version 0.2.44 | ||
cargo ws version --no-git-commit -y --exact --force 'lance*' ${{ inputs.part }} | ||
- name: Bump java version | ||
working-directory: java | ||
shell: bash | ||
run: | | ||
# Get current version | ||
current_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
current_version=${current_version%\%} | ||
# Split the version into components using parameter expansion | ||
major=${current_version%%.*} | ||
minor=${current_version#*.} | ||
minor=${minor%%.*} | ||
patch=${current_version##*.} | ||
case "${{ inputs.part }}" in | ||
patch) | ||
patch=$((patch + 1)) | ||
;; | ||
minor) | ||
minor=$((minor + 1)) | ||
patch=0 | ||
;; | ||
major) | ||
major=$((major + 1)) | ||
minor=0 | ||
patch=0 | ||
;; | ||
*) | ||
echo "Invalid part specified" | ||
exit 1 | ||
;; | ||
esac | ||
new_version="${major}.${minor}.${patch}" | ||
mvn versions:set versions:commit -DnewVersion=$new_version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
name: Build and publish Java packages | ||
on: | ||
release: | ||
# Use released instead of published, since we don't publish preview/beta | ||
# versions | ||
types: [released] | ||
pull_request: | ||
paths: | ||
|
@@ -99,7 +101,12 @@ jobs: | |
run: | | ||
git config --global user.email "Lance Github Runner" | ||
git config --global user.name "[email protected]" | ||
- name: Dry run | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
mvn --batch-mode -DskipTests package | ||
- name: Publish with Java 8 | ||
if: github.event_name == 'release' | ||
run: | | ||
echo "use-agent" >> ~/.gnupg/gpg.conf | ||
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf | ||
|