chore(main): release 0.1.0 #17
Workflow file for this run
This file contains hidden or 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
# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json | |
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Build | |
run: go build ./... | |
tidy: | |
name: Tidy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Verify that go.mod is already tidy | |
run: test -z "$(go mod tidy -diff)" | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Run tests | |
run: go test ./... | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Run linter | |
uses: golangci/golangci-lint-action@v8 | |
with: | |
version: v2.1 | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
needs: [build, tidy, test, lint] | |
steps: | |
- name: Create app token | |
uses: actions/create-github-app-token@v2 | |
id: app-token | |
with: | |
app-id: ${{ vars.APP_ID }} | |
private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Create release | |
uses: googleapis/release-please-action@v4 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
config-file: .github/release-please-config.json | |
manifest-file: .github/.release-please-manifest.json |