Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
56b1e3612b | |||
3e9453bf56 | |||
ea862ef834 | |||
794f3ed498 |
4 changed files with 182 additions and 0 deletions
81
.forgejo/workflows/build.yml
Normal file
81
.forgejo/workflows/build.yml
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- beta
|
||||||
|
- develop
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
checks:
|
||||||
|
name: Checks
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '1.23.x'
|
||||||
|
check-latest: true
|
||||||
|
- name: Run go fmt and go vet
|
||||||
|
run: |
|
||||||
|
go fmt $(go list ./...)
|
||||||
|
go vet $(go list ./...)
|
||||||
|
|
||||||
|
code-coverage:
|
||||||
|
name: Code Coverage
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '1.23.x'
|
||||||
|
check-latest: true
|
||||||
|
- name: Run tests and generate coverage report
|
||||||
|
run: |
|
||||||
|
go test -covermode=count -coverprofile coverage.cov $(go list ./...)
|
||||||
|
go tool cover -func=coverage.cov
|
||||||
|
go tool cover -html=coverage.cov -o coverage.html
|
||||||
|
- name: Upload coverage artifacts
|
||||||
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: coverage-reports
|
||||||
|
path: |
|
||||||
|
coverage.cov
|
||||||
|
coverage.html
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: docker
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go:
|
||||||
|
- GOOS: darwin
|
||||||
|
GOARCH: amd64
|
||||||
|
- GOOS: darwin
|
||||||
|
GOARCH: arm64
|
||||||
|
- GOOS: linux
|
||||||
|
GOARCH: amd64
|
||||||
|
- GOOS: linux
|
||||||
|
GOARCH: arm64
|
||||||
|
- GOOS: windows
|
||||||
|
GOARCH: amd64
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '1.23.x'
|
||||||
|
check-latest: true
|
||||||
|
- name: Set environment variables
|
||||||
|
run: |
|
||||||
|
echo "GOOS=${{ matrix.go.GOOS }}" >> $GITHUB_ENV
|
||||||
|
echo "GOARCH=${{ matrix.go.GOARCH }}" >> $GITHUB_ENV
|
||||||
|
- name: Build
|
||||||
|
run: go build .
|
20
.forgejo/workflows/release.yml
Normal file
20
.forgejo/workflows/release.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- beta
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Semantic Release
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Semantic Release
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
npm install -g semantic-release@23 conventional-changelog-conventionalcommits@7
|
||||||
|
semantic-release
|
72
.releaserc
Normal file
72
.releaserc
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
{
|
||||||
|
"branches": [
|
||||||
|
"main",
|
||||||
|
{
|
||||||
|
"name": "beta",
|
||||||
|
"prerelease": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
{
|
||||||
|
"preset": "conventionalcommits",
|
||||||
|
"releaseRules": [
|
||||||
|
{
|
||||||
|
"type": "chore",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ci",
|
||||||
|
"release": "patch"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
{
|
||||||
|
"preset": "conventionalcommits",
|
||||||
|
"presetConfig": {
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "feat",
|
||||||
|
"section": "Features"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "feature",
|
||||||
|
"section": "Features"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "fix",
|
||||||
|
"section": "Bug Fixes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "perf",
|
||||||
|
"section": "Performance Improvements"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "revert",
|
||||||
|
"section": "Reverts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "chore",
|
||||||
|
"section": "Miscellaneous Chores"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/github",
|
||||||
|
{
|
||||||
|
"successCommentCondition": false,
|
||||||
|
"failTitle": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
9
renovate.json
Normal file
9
renovate.json
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"local>ci/renovate//configs/base"
|
||||||
|
],
|
||||||
|
"baseBranches": [
|
||||||
|
"develop"
|
||||||
|
]
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue