Skip to content

docs: cleanup README.md and add docs site #210

docs: cleanup README.md and add docs site

docs: cleanup README.md and add docs site #210

Workflow file for this run

name: goreleaser
on:
pull_request:
push:
branches:
- "master"
- "develop"
tags:
- 'v*'
env:
GO_VERSION: '1.25'
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Test
run: go test -v ./...
docs:
name: Check generated docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Generate docs
run: make docs
- name: Verify docs are up to date
run: |
# Use porcelain so newly added (untracked) command pages are caught too.
if [ -n "$(git status --porcelain -- docs/src/content/docs/commands)" ]; then
echo "::error::Generated command docs are out of date. Run 'make docs' and commit the result."
git status --porcelain -- docs/src/content/docs/commands
git diff -- docs/src/content/docs/commands
exit 1
fi
build:
name: Build Go binaries
needs: [ test ]
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Run GoReleaser build
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: "~> v2"
args: release --clean --skip=validate --skip=publish --parallelism 5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload assets
uses: actions/upload-artifact@v7
with:
name: qbittorrent-cli
path: |
dist/*.tar.gz
dist/*.zip
release:
name: Build and publish binaries
needs: [ test ]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}
cache: true
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}