From 1a850b98e38618e841b774ec3d8d880e2bb751ae Mon Sep 17 00:00:00 2001 From: Timo Behrendt Date: Wed, 8 Oct 2025 16:26:31 +0200 Subject: [PATCH] complete ci --- .gitea/actions/release-git-tag/action.yaml | 15 ++++++++++++++ .gitea/workflows/cd.yaml | 23 ++++++++++++++++++++++ .gitea/workflows/ci.yaml | 3 ++- .gitea/workflows/prerelease.yaml | 22 +++++++++++++++++++++ 4 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 .gitea/actions/release-git-tag/action.yaml create mode 100644 .gitea/workflows/cd.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..c7e3fab --- /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 }} diff --git a/.gitea/workflows/cd.yaml b/.gitea/workflows/cd.yaml new file mode 100644 index 0000000..629e7ae --- /dev/null +++ b/.gitea/workflows/cd.yaml @@ -0,0 +1,23 @@ +name: CD + +on: + push: + branches: + - main + +jobs: + release: + 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 }} + - uses: ./.gitea/actions/release-git-tag + with: + tag: ${{ steps.tag.outputs.new-tag }} diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index bd43e19..8309b5f 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -4,7 +4,8 @@ on: pull_request: jobs: - build: + test: + name: Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 diff --git a/.gitea/workflows/prerelease.yaml b/.gitea/workflows/prerelease.yaml new file mode 100644 index 0000000..0226d22 --- /dev/null +++ b/.gitea/workflows/prerelease.yaml @@ -0,0 +1,22 @@ +name: Prerelease + +on: + workflow_dispatch: + +jobs: + prerelease: + name: Prerelease + 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 }}