-
Notifications
You must be signed in to change notification settings - Fork 2
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
3 changed files
with
188 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Create beta version | ||
|
||
on: | ||
push: | ||
branches: | ||
- v2-develop | ||
|
||
jobs: | ||
release-rc: | ||
if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: "17" | ||
- name: setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 18 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: setup semantic-release | ||
run: npm install -g semantic-release @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/exec semantic-release/git semantic-release/release-notes-generator @saithodev/semantic-release-backmerge conventional-changelog-conventionalcommits | ||
- name: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: npx semantic-release | ||
|
||
build: | ||
needs: release-rc | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release-version: ${{ steps.version-step.outputs.pe-version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: v2-develop | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: "17" | ||
|
||
- name: Get current version | ||
id: version-step | ||
run: echo "pe-version=$(mvn -f pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT | ||
|
||
- name: Print PE Version | ||
run: echo ${{ steps.version-step.outputs.pe-version }} | ||
|
||
- name: Build PE | ||
run: mvn package --no-transfer-progress | ||
|
||
- name: Upload PE jar | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: pe-jar | ||
path: target/*.jar | ||
|
||
docker: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: v2-develop | ||
- name: Download PE jar | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: pe-jar | ||
path: target/ | ||
|
||
- name: Publish to Docker Hub | ||
uses: elgohr/Publish-Docker-Github-Action@v5 | ||
with: | ||
name: inseefr/public-enemy-back-office | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
default_branch: v2-develop | ||
tags: latest |
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 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,68 @@ | ||
{ | ||
"branches": [ | ||
"v2-main", | ||
{ | ||
"name": "v2-develop", | ||
"prerelease": "beta" | ||
} | ||
], | ||
"tagFormat": "${version}", | ||
"repositoryUrl": "https://github.com/InseeFr/Public-Enemy-Back-Office", | ||
"debug": "true", | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "conventionalcommits" | ||
} | ||
], | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "conventionalcommits", | ||
"writerOpts": { | ||
"groupBy": "type", | ||
"commitGroupsSort": "title", | ||
"commitsSort": "header" | ||
}, | ||
"linkCompare": true, | ||
"linkReferences": true | ||
} | ||
], | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "CHANGELOG.md", | ||
"changelogTitle": "# Semantic Versioning Changelog" | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "mvn versions:set -DnewVersion=${nextRelease.version} --no-transfer-progress" | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"CHANGELOG.md", | ||
"pom.xml" | ||
], | ||
"message": "chore(release): Bumped to version ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
], | ||
"@semantic-release/github", | ||
[ | ||
"@saithodev/semantic-release-backmerge", | ||
{ | ||
"branches": [ | ||
{ | ||
"from": "v2-main", | ||
"to": "v2-develop" | ||
} | ||
] | ||
} | ||
] | ||
] | ||
} |