-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from Netcracker/feature/workflows-2
chore: Remove outdated GitHub Actions workflows and release drafter c…
- Loading branch information
Showing
4 changed files
with
92 additions
and
103 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 |
---|---|---|
|
@@ -39,4 +39,4 @@ version-resolver: | |
patch: | ||
labels: | ||
- patch | ||
default: patch | ||
default: patch |
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,91 @@ | ||
--- | ||
|
||
# This GitHub Actions workflow is designed to be triggered when a release is marked as a full release. | ||
# The workflow performs the following tasks: | ||
# - Extract Release Version: Extracts the tag name and removes the leading 'v' character to get the release version. | ||
# - Update pom.xml: Updates the version in the pom.xml file using the extracted release version. | ||
# - Publish to Maven: Publishes the artifact to the Maven repository using the updated pom.xml. | ||
|
||
name: Release And Upload to Maven Central | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
required: true | ||
default: '2025.1-1.0.0' | ||
type: string | ||
description: 'Release version (e.g., 2025.1-1.0.0)' | ||
java_version: | ||
required: false | ||
type: string | ||
default: "21" | ||
description: 'Java version (e.g., 21)' | ||
|
||
jobs: | ||
check-tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Input parameters | ||
run: | | ||
echo "Version: ${{ github.event.inputs.version }}" >> $GITHUB_STEP_SUMMARY | ||
echo "Java version: ${{ github.event.inputs.java_version }}" >> $GITHUB_STEP_SUMMARY | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check if tag exists | ||
id: check_tag | ||
uses: netcracker/qubership-workflow-hub/actions/tag-checker@main | ||
with: | ||
tag: 'v${{ github.event.inputs.version }}' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Output result | ||
run: | | ||
echo "Tag exists: ${{ steps.check_tag.outputs.exists }}" | ||
echo "Tag name: v${{ github.event.inputs.version }}" | ||
- name: Fail if tag exists | ||
if: steps.check_tag.outputs.exists == 'true' | ||
run: | | ||
echo "Tag already exists: v${{ github.event.inputs.version }}" >> $GITHUB_STEP_SUMMARY | ||
echo "Tag already exists: v${{ github.event.inputs.version }}" | ||
exit 1 | ||
update-pom-version: | ||
needs: [check-tag] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update pom.xml | ||
uses: Netcracker/qubership-workflow-hub/actions/pom-updater@main | ||
with: | ||
new_value: ${{ github.event.inputs.version }} | ||
- name: Commit Changes | ||
uses: Netcracker/qubership-workflow-hub/actions/commit-and-push@main | ||
with: | ||
commit_message: "Update pom.xml version to ${{ github.event.inputs.version }}" | ||
|
||
upload_to_maven_central: | ||
needs: [update-pom-version] | ||
uses: Netcracker/qubership-workflow-hub/.github/workflows/maven-publish.yml@main | ||
with: | ||
maven_command: "--batch-mode deploy" | ||
java_version: ${{ github.event.inputs.java_version }} | ||
version: ${{ github.event.inputs.version }} | ||
secrets: | ||
maven_username: ${{ secrets.MAVEN_USER }} | ||
maven_password: ${{ secrets.MAVEN_PASSWORD }} | ||
maven_gpg_passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
maven_gpg_private_key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
|
||
github-release: | ||
needs: [publish] | ||
uses: Netcracker/qubership-workflow-hub/.github/workflows/release-drafter.yml@main | ||
with: | ||
version: ${{ github.event.inputs.version }} | ||
publish: false |
This file was deleted.
Oops, something went wrong.