From 0093fdfc60031dd0378fff9ac1c9200928f140e8 Mon Sep 17 00:00:00 2001 From: Timo Behrendt Date: Mon, 19 May 2025 21:52:48 +0200 Subject: [PATCH] ci: add release pipeline --- .gitea/workflows/cd.yaml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .gitea/workflows/cd.yaml diff --git a/.gitea/workflows/cd.yaml b/.gitea/workflows/cd.yaml new file mode 100644 index 0000000..dc8ad3e --- /dev/null +++ b/.gitea/workflows/cd.yaml @@ -0,0 +1,43 @@ +name: CI & Release + +on: + push: + branches: + - main + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "stable" + + - name: Download dependencies + run: go mod download + + - name: Run tests + run: go test ./... + + release: + needs: tests + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: "22" + - run: | + git config --global user.name "Gitea Actions" + git config --global user.email "gitea-actions@t00n.de" + - name: Release + run: | + npx standard-version --no-verify --skip-git --skip-changelog + git push --follow-tags origin HEAD