feat: use CI_JOB_TOKEN if no PAT provided #37
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@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19 | |
- uses: golangci/golangci-lint-action@v3 | |
build: | |
runs-on: ${{ matrix.os }} | |
needs: lint | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19 | |
- run: go build ./cmd/provider-gitlab/ | |
- run: go test -v ./... | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19 | |
- uses: go-semantic-release/action@v1 | |
with: | |
hooks: goreleaser,plugin-registry-update | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PLUGIN_REGISTRY_ADMIN_ACCESS_TOKEN: ${{ secrets.PLUGIN_REGISTRY_ADMIN_ACCESS_TOKEN }} |