This commit is contained in:
44
.gitea/workflows/cd.yaml
Normal file
44
.gitea/workflows/cd.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
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:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
- run: npm install -g standard-version
|
||||
- run: |
|
||||
git config --global user.name "Release Bot"
|
||||
git config --global user.email "release-bot@t00n.de"
|
||||
- run: |
|
||||
standard-version --no-verify --skip-changelog
|
||||
git push --follow-tags origin main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
Reference in New Issue
Block a user