From 6e434a92ca000ce49df6c70a87e561ddb5166ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serhat=20G=C3=BCl=C3=A7i=C3=A7ek?= Date: Fri, 31 Jul 2026 13:39:50 +0200 Subject: [PATCH] [github-actions] Add create-release job Also done some cleanup associated with this. --- .github/workflows/create-release.yml | 27 +++++++++++++++++++ .../{on-push.yml => on-code-push.yml} | 7 ++--- ...n-release-published.yml => on-new-tag.yml} | 9 +++---- ...ll_request-opened-synchronize-reopened.yml | 5 +--- 4 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/create-release.yml rename .github/workflows/{on-push.yml => on-code-push.yml} (84%) rename .github/workflows/{on-release-published.yml => on-new-tag.yml} (76%) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..2fb357b --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,27 @@ +name: create-release + +on: + workflow_dispatch: + inputs: + RELEASE_VERSION: + description: 'Release version (e.g. 1.0.0)' + required: true + NEXT_DEV_VERSION: + description: 'Next development version (e.g. 1.0.1-SNAPSHOT)' + required: true + +jobs: + job: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Init the github-actions repo + uses: aerius/github-actions/init@v1.1 + + - uses: ./aerius-github-actions/extras/maven-release-action + with: + DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} + RELEASE_VERSION: ${{ github.event.inputs.RELEASE_VERSION }} + NEXT_DEV_VERSION: ${{ github.event.inputs.NEXT_DEV_VERSION }} diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-code-push.yml similarity index 84% rename from .github/workflows/on-push.yml rename to .github/workflows/on-code-push.yml index 3f3c418..198ed3f 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-code-push.yml @@ -1,7 +1,10 @@ -name: push-event +name: code-push on: push: + branches: + - 'main' + - '**_fixes' jobs: job: @@ -13,8 +16,6 @@ jobs: - uses: ./aerius-github-actions/events/push-event-action with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} - diff --git a/.github/workflows/on-release-published.yml b/.github/workflows/on-new-tag.yml similarity index 76% rename from .github/workflows/on-release-published.yml rename to .github/workflows/on-new-tag.yml index bfba593..3ef6240 100644 --- a/.github/workflows/on-release-published.yml +++ b/.github/workflows/on-new-tag.yml @@ -1,8 +1,9 @@ -name: release-published-event +name: new-tag on: - release: - types: [published] + push: + tags: + - '**' jobs: job: @@ -14,8 +15,6 @@ jobs: - uses: ./aerius-github-actions/events/release-event-action with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} - diff --git a/.github/workflows/on-pull_request-opened-synchronize-reopened.yml b/.github/workflows/on-pull_request-opened-synchronize-reopened.yml index 1d049c2..31d1c78 100644 --- a/.github/workflows/on-pull_request-opened-synchronize-reopened.yml +++ b/.github/workflows/on-pull_request-opened-synchronize-reopened.yml @@ -1,4 +1,4 @@ -name: pull_request-opened-synchronize-reopened-event +name: pull_request-opened-synchronize-reopened on: pull_request: @@ -13,6 +13,3 @@ jobs: uses: aerius/github-actions/init@v1.1 - uses: ./aerius-github-actions/events/pull_request-event-action - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -