feat: trigger plugin registry update on release #41
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: CI | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- uses: golangci/[email protected] | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
# Alternatively, install using go install | |
- name: Set up gotestfmt | |
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | |
# Run tests with nice formatting. Save the original log in /tmp/gotest.log | |
- name: Run tests | |
run: | | |
set -euo pipefail | |
go test -json -race -covermode=atomic -coverprofile=coverage.out ./... 2>&1 | tee /tmp/gotest.log | gotestfmt | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
build: | |
runs-on: ${{ matrix.os }} | |
needs: | |
- lint | |
- test | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- run: go build ./_cmd/provider-gitea/ | |
# - run: go test -v ./... | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- uses: go-semantic-release/action@v1 | |
with: | |
hooks: goreleaser,plugin-registry-update | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
PLUGIN_REGISTRY_ADMIN_ACCESS_TOKEN: ${{ secrets.PLUGIN_REGISTRY_ADMIN_ACCESS_TOKEN }} |