-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: update to alternative maven-semantic-release (#53)
- Loading branch information
Showing
4 changed files
with
76 additions
and
5,302 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 |
---|---|---|
@@ -1,35 +1,25 @@ | ||
name: Pull Request CI | ||
name: Build and test for the pull request | ||
|
||
on: [pull_request] | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
name: Build and test | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'maven' | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: 'yarn' | ||
- name: Setup semantic-release | ||
run: | | ||
yarn global add @conveyal/[email protected] semantic-release@15 | ||
echo "$(yarn global bin)" >> $GITHUB_PATH | ||
- name: Build with Maven | ||
run: mvn -B package | ||
- name: Dry Release | ||
# maven-semantic-release requires "maven-settings.xml" in the workspace directory | ||
run: | | ||
mv ~/.m2/settings.xml maven-settings.xml | ||
semantic-release --dry-run --branch master --use-conveyal-workflow --skip-maven-deploy | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
cache: 'maven' | ||
|
||
- name: Build with Maven | ||
run: mvn -B package | ||
|
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 |
---|---|---|
|
@@ -11,27 +11,32 @@ jobs: | |
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'maven' | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: 'yarn' | ||
- name: Setup semantic-release | ||
run: | | ||
yarn global add @conveyal/[email protected] semantic-release@15 | ||
echo "$(yarn global bin)" >> $GITHUB_PATH | ||
- name: Release | ||
# maven-semantic-release requires "maven-settings.xml" in the workspace directory | ||
run: | | ||
mv ~/.m2/settings.xml maven-settings.xml | ||
semantic-release --branch master --use-conveyal-workflow --skip-maven-deploy | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
# Disabling shallow clone is needed for correctly determing next release with semantic release | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
cache: 'maven' | ||
|
||
- name: Test | ||
run: mvn -B test | ||
|
||
- name: Semantic release | ||
id: semantic | ||
uses: cycjimmy/semantic-release-action@v4 | ||
with: | ||
semantic_version: 23 | ||
extra_plugins: | | ||
@semantic-release/changelog@6 | ||
@terrestris/maven-semantic-release@2 | ||
@semantic-release/git@10 | ||
env: | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,36 @@ | ||
{ | ||
"branches": [ | ||
"master" | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@conveyal/maven-semantic-release", | ||
["@semantic-release/github", { | ||
"assets": [ | ||
{"path": "ear/target/*.ear"} | ||
] | ||
}] | ||
"@semantic-release/changelog", | ||
[ | ||
"@terrestris/maven-semantic-release", | ||
{ | ||
"mavenTarget": "install", | ||
"clean": false, | ||
"updateSnapshotVersion": true, | ||
"settingsPath": "/home/runner/.m2/settings.xml", | ||
"processAllModules": true | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"CHANGELOG.md", "pom.xml", "**/pom.xml" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
], | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"successComment": false, | ||
"failTitle": false | ||
} | ||
] | ||
] | ||
} | ||
|
Oops, something went wrong.