-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release scripts and updates to pom (#401)
* fix java install * try out a cron job * jreleaser.yml action * update release scripts * error in tag name parameter * changelog tweaks * Fix issue with dependabot changes in changelog. Co-authored-by: Andres Almiray <[email protected]> * cleanup github-release script * set contenttype in gctoolkit release pipeline to Maven --------- Co-authored-by: Andres Almiray <[email protected]>
- Loading branch information
Showing
7 changed files
with
161 additions
and
77 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
PROJECT_HOME=$SCRIPT_DIR/../.. | ||
|
||
cd $PROJECT_HOME | ||
|
||
GIT_AUTHOR_NAME='Git' \ | ||
GIT_AUTHOR_EMAIL='[email protected]' \ | ||
GIT_COMMITTER_NAME='Git' \ | ||
GIT_COMMITTER_EMAIL='[email protected]' \ | ||
./mvnw -B -DskipTests clean release:clean release:prepare -Prelease -DpushChanges=false |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
PROJECT_HOME=$SCRIPT_DIR/../.. | ||
|
||
cd $PROJECT_HOME | ||
|
||
previous_release_version=$( \ | ||
curl --location --silent \ | ||
-H "Accept: application/vnd.github+json" \ | ||
https://api.github.com/repos/microsoft/gctoolkit/releases/latest | grep 'tag_name' \ | ||
) | ||
previous_release_version=$( perl -pe 's/"tag_name":\s+"(.*?)",?/$1/' <<< $previous_release_version ) | ||
|
||
release_version=$( git tag --sort=-taggerdate --list | head -n 1 ) | ||
|
||
./mvnw -B -pl :gctoolkit -Pjreleaser jreleaser:release \ | ||
-Djreleaser.previous.tag.name=${previous_release_version} \ | ||
-Djreleaser.tag.name=${release_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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
trigger: none | ||
|
||
schedules: | ||
- cron: 0 0 * * 0 | ||
displayName: "Weekly build" | ||
branches: | ||
include: [ main ] | ||
always: true | ||
|
||
variables: | ||
JAVA_HOME_11_X64: /usr/lib/jvm/msopenjdk-11 | ||
|
||
pool: | ||
name: JEG-mariner2.0-x64-release | ||
|
||
steps: | ||
- task: JavaToolInstaller@0 | ||
inputs: | ||
versionSpec: '11' | ||
jdkArchitectureOption: 'x64' | ||
jdkSourceOption: 'PreInstalled' | ||
env: | ||
JAVA_HOME_11_X64: $(JAVA_HOME_11_X64) | ||
displayName: 'Set Java to v11' | ||
|
||
- checkout: self | ||
clean: true | ||
|
||
- task: Maven@4 | ||
inputs: | ||
mavenPomFile: 'pom.xml' | ||
goals: 'clean package' | ||
options: '-B -Prelease' | ||
mavenOptions: '-s $(Build.SourcesDirectory)/.devops/feed-settings.xml' | ||
mavenAuthenticateFeed: true | ||
jdkVersionOption: '1.11' | ||
jdkArchitectureOption: 'x64' | ||
displayName: 'Build with Maven' |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Release to GitHub using JReleaser | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
ref: main | ||
fetch-depth: 0 | ||
|
||
- name: Cache Maven | ||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Setup Java JDK | ||
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 | ||
with: | ||
java-version: '11' | ||
distribution: 'microsoft' | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_CENTRAL_TOKEN | ||
|
||
- name: Configure Git user | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "GitHub" | ||
git config committer.name "GitHub" | ||
git config committer.email "[email protected]" | ||
- name: Version | ||
id: version | ||
run: | | ||
release_version=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
release_version=${release_version%-*} | ||
echo ::set-output name=version::${release_version} | ||
- name: Git-release | ||
run: | | ||
./mvnw -B versions:set -DnewVersion=${{steps.version.outputs.version}} | ||
./mvnw -B -pl :gctoolkit -Pjreleaser jreleaser:release | ||
env: | ||
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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