docs: add readme (#1) #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🚀 Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
tag-check: | |
name: 🏷️ Tag Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check tag | |
run: echo "${{ github.ref_name }}" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+(\.[0-9]+)?)?$' | |
check: | |
name: 🧐 Pre-release check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup toolchain | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Get dependencies | |
run: go get -v ./... | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
- name: Lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.59 | |
release: | |
name: 🆕 New release | |
runs-on: ubuntu-latest | |
needs: check | |
steps: | |
- name: Create release via GitHub CLI | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACTIONS_PERSONAL_ACCESS_TOKEN }} | |
tag: ${{ github.ref_name }} | |
run: gh release create "$tag" --repo="$GITHUB_REPOSITORY" --title="${GITHUB_REPOSITORY#*/} v${tag#v}" --generate-notes |