chore: add README, go.mod, and go.sum for Term Tier project
- Created README.md with project description, features, installation instructions, usage, key bindings, project structure, and license information. - Initialized go.mod to manage dependencies for the Term Tier application. - Generated go.sum to ensure consistent dependency resolution.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
name: Publish
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
public:
|
||||
name: Publish
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Bump version and push tag
|
||||
id: tag_version
|
||||
uses: mathieudutour/github-tag-action@v6.2
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
default_bump: patch
|
||||
release_branches: main
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: '1.25'
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GORELEASER_CURRENT_TAG: ${{ steps.tag_version.outputs.new_tag }}
|
||||
@@ -0,0 +1,33 @@
|
||||
name: Pull Request
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
test-and-lint:
|
||||
name: Test, Format & Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: '1.25'
|
||||
cache: true
|
||||
- name: Check formatting
|
||||
run: |
|
||||
# Fails if any files are not formatted correctly
|
||||
if [ -n "$(gofmt -l .)" ]; then
|
||||
echo "Go code is not formatted:"
|
||||
gofmt -d .
|
||||
exit 1
|
||||
fi
|
||||
- name: Run go vet
|
||||
run: go vet ./...
|
||||
- name: Run tests
|
||||
run: go test -v ./...
|
||||
- name: Run linter
|
||||
uses: golangci/golangci-lint-action@v9
|
||||
with:
|
||||
version: latest
|
||||
Reference in New Issue
Block a user