fix: mark roundabout control context as 'for removal' #48
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
name: Create release | |
on: | |
push: | |
branches: | |
- v3-main | |
paths-ignore: | |
- 'renovate.json' | |
jobs: | |
check-version: | |
runs-on: ubuntu-latest | |
outputs: | |
release-version: ${{ steps.version.outputs.version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get version | |
id: version | |
run: echo "version=$(mvn -f pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT | |
- name: Print version | |
run: echo ${{ steps.version.outputs.version }} | |
- uses: mukunku/[email protected] | |
name: Check tag existence | |
id: check-tag-exists | |
with: | |
tag: ${{ steps.version.outputs.version }} | |
- name: Tag verification | |
id: check-tag | |
run: | | |
if [[ "${{ steps.check-tag-exists.outputs.exists }}" == "true" ]]; then | |
echo "Nothing to tag/release, the tag ${{ steps.version.outputs.version }} already exists" | |
exit 1 | |
fi | |
if ! [[ "${{ steps.version.outputs.version }}" =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then | |
echo "Nothing to tag/release, the tag ${{ steps.version.outputs.version }} is not in correct format X.Y.Z" | |
exit 1 | |
fi | |
create-release: | |
needs: check-version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
fetch-depth: 0 | |
- name: Get previous final release tag | |
id: previousTag | |
run: echo "previousTag=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$" | tail -1)" >> $GITHUB_OUTPUT | |
- name: Create release note | |
id: changelog | |
uses: requarks/changelog-action@v1 | |
with: | |
fromTag: ${{ github.sha }} | |
toTag: ${{ steps.previousTag.outputs.previousTag}} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
writeToFile: false | |
- uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ needs.check-version.outputs.release-version }} | |
target_commitish: ${{ github.head_ref || github.ref }} | |
name: ${{ needs.check-version.outputs.release-version }} | |
body: ${{steps.changelog.outputs.changes}} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
deploy-maven-repo: | |
needs: check-version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Maven Central Repository | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Deploy with Maven | |
run: mvn --batch-mode clean deploy -Pdeploy -DskipTests=true --no-transfer-progress | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} |