From 4e3b94a606f24320544340d93ebf5389cf1865ab Mon Sep 17 00:00:00 2001 From: "t.behrendt" Date: Wed, 8 Oct 2025 15:59:17 +0200 Subject: [PATCH] ci: add pre-release workflow (#4) Reviewed-on: https://gitea.t000-n.de/t.behrendt/validate-json-by-json-schema-action/pulls/4 Co-authored-by: t.behrendt Co-committed-by: t.behrendt --- .gitea/actions/release-git-tag/action.yaml | 15 +++++++++++++++ .gitea/workflows/cd.yaml | 9 ++++----- .gitea/workflows/prerelease.yaml | 22 ++++++++++++++++++++++ 3 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 .gitea/actions/release-git-tag/action.yaml create mode 100644 .gitea/workflows/prerelease.yaml diff --git a/.gitea/actions/release-git-tag/action.yaml b/.gitea/actions/release-git-tag/action.yaml new file mode 100644 index 0000000..37a1eaa --- /dev/null +++ b/.gitea/actions/release-git-tag/action.yaml @@ -0,0 +1,15 @@ +name: Release Git tag +description: Release the Git tag + +inputs: + tag: + description: The tag to release + required: true + +runs: + using: "composite" + steps: + - shell: bash + run: | + git tag ${{ inputs.tag }} + git push origin ${{ inputs.tag }} \ No newline at end of file diff --git a/.gitea/workflows/cd.yaml b/.gitea/workflows/cd.yaml index bb52d1a..f24f183 100644 --- a/.gitea/workflows/cd.yaml +++ b/.gitea/workflows/cd.yaml @@ -14,11 +14,10 @@ jobs: with: fetch-depth: 0 - name: Increment tag - id: increment-tag + id: tag uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@0.1.1 with: token: ${{ secrets.GITEA_TOKEN }} - - name: Push tag - run: | - git tag ${{ steps.increment-tag.outputs.new-tag }} - git push origin ${{ steps.increment-tag.outputs.new-tag }} + - uses: ./.gitea/actions/release-git-tag + with: + tag: ${{ steps.tag.outputs.new-tag }} \ No newline at end of file diff --git a/.gitea/workflows/prerelease.yaml b/.gitea/workflows/prerelease.yaml new file mode 100644 index 0000000..e8a3a93 --- /dev/null +++ b/.gitea/workflows/prerelease.yaml @@ -0,0 +1,22 @@ +name: Prerelease + +on: + workflow_dispatch: + +jobs: + prerelease: + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + - name: Increment tag + id: tag + uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@0.1.1 + with: + token: ${{ secrets.GITEA_TOKEN }} + prerelease: true + - uses: ./.gitea/actions/release-git-tag + with: + tag: ${{ steps.tag.outputs.new-tag }} \ No newline at end of file