Skip to content

release version

release version #94

Workflow file for this run

name: release version
on:
workflow_dispatch:
inputs:
CI_COMMIT_TAG:
description: 'for release semantic versioning'
required: true
type: string
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: "temurin"
cache: maven
- uses: whelk-io/maven-settings-xml-action@v21
with:
servers: >
[{
"id": "rdc-releases",
"username": "${{ secrets.MVN_USERNAME }}",
"password": "${{ secrets.MVN_PASSWORD }}"
},{
"id": "rdc-snapshots",
"username": "${{ secrets.MVN_USERNAME }}",
"password": "${{ secrets.MVN_PASSWORD }}"
}]
repositories: >
[{
"id": "payara-artifacts",
"url": "https://nexus.payara.fish/repository/payara-artifacts",
"releases": {
"enabled": "true"
}
}]
profiles: >
[{
"id": "rdc",
"properties": {
"altReleaseDeploymentRepository": "rdc-releases::https://packages.aliyun.com/maven/repository/2040008-release-fvpoDf/",
"altSnapshotDeploymentRepository":"rdc-snapshots:https://packages.aliyun.com/maven/repository/2040008-snapshot-Ewki7J/"
}
}]
active_profiles: >
["rdc","github"]
output_file: /home/runner/.m2/settings.xml
- name: Build Release
run: |
git checkout -B for_release
./mvnw versions:set-property -DgenerateBackupPoms=false -Dproperty=revision -DnewVersion=${{ inputs.CI_COMMIT_TAG }}
./mvnw clean deploy -Dmaven.test.skip=true --batch-mode -s /home/runner/.m2/settings.xml
git config --global user.email "[email protected]"
git config --global user.name "ci-bot"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git commit -a -m "ci release ${{ inputs.CI_COMMIT_TAG }} "
git tag ${{ inputs.CI_COMMIT_TAG }}
git push origin ${{ inputs.CI_COMMIT_TAG }}
- name: notification
uses: slackapi/[email protected]
with:
channel-id: 'cicd'
slack-message: "github build result: ${{ job.status }} ,version ${{ inputs.CI_COMMIT_TAG }} @here"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN}}