fix: removes redundant ctx reference #27
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: | |
branches: [ main ] | |
paths-ignore: | |
- '*.md' | |
- '*.json' | |
- '*.yml' | |
- '*.yaml' | |
- 'LICENSE' | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: ✨ Checkout repository | |
uses: actions/checkout@v3 | |
- name: 💻 Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.19.3' | |
check-latest: true | |
- name: 📥 Install dependencies | |
run: go get ./... | |
- name: 📝 Check code style | |
run: gofmt -d -s -w . | |
- name: 🔬 Test Go with coverage | |
run: go test -coverprofile=coverage.out ./... ; go tool cover -func=coverage.out | |
- name: 🎢 Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
release: | |
runs-on: ubuntu-latest | |
needs: [ test ] | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- run: | | |
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list | |
sudo apt update | |
sudo apt install goreleaser | |
npm install --save-dev semantic-release | |
- name: ✨ Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # required for goreleaser | |
- run: git fetch --force --tags | |
- name: 💻 Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.19.3' | |
- name: 📥 Install dependencies | |
run: go get ./... | |
- name: 📝 Check code style | |
run: gofmt -d -s -w . | |
- run: npx -p @semantic-release/changelog -p @semantic-release/exec -p @semantic-release/git semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} |