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 }}