-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
91ce0e8
commit 6f6dbff
Showing
1 changed file
with
43 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ executors: | |
|
||
orbs: | ||
go: circleci/[email protected] | ||
utils: ethereum-optimism/[email protected] | ||
|
||
commands: | ||
# By default, CircleCI does not checkout any submodules | ||
|
@@ -50,6 +51,22 @@ commands: | |
name: Setup golangci-lint | ||
command: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin << parameters.version >> | ||
|
||
install-goreleaser: | ||
parameters: | ||
version: | ||
type: string | ||
default: "2.5.1" | ||
steps: | ||
- run: | ||
name: Install GoReleaser | ||
command: | | ||
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list | ||
sudo apt -q update -y | ||
sudo apt -q install -y --no-install-recommends goreleaser=<< parameters.version >> | ||
- run: | ||
name: Output GoReleaser version | ||
command: goreleaser --version | ||
|
||
install-go-modules: | ||
steps: | ||
- go/load-mod-cache # Load cached Go modules. | ||
|
@@ -106,6 +123,20 @@ jobs: | |
name: Run tests | ||
command: just test-go | ||
no_output_timeout: 20m | ||
|
||
go-release: | ||
executor: default | ||
steps: | ||
- checkout-with-submodules | ||
- install-goreleaser | ||
- install-go-modules | ||
- utils/get-github-access-token: | ||
# We match the name of the token environment variable with what GoReleaser expects in .goreleaser.yaml | ||
output-token-name: TAP_REPO_GITHUB_TOKEN | ||
- run: | ||
name: Run GoReleaser | ||
# FIXME Just for the time being we add the --snapshot flag | ||
command: goreleaser release --snapshot --clean | ||
|
||
workflows: | ||
main: | ||
|
@@ -115,4 +146,15 @@ workflows: | |
- go-lint | ||
- go-tests: | ||
context: | ||
- oplabs-rpc-urls | ||
- oplabs-rpc-urls | ||
release: | ||
jobs: | ||
- go-release: | ||
filters: | ||
tags: | ||
only: | ||
- /^v.*/ | ||
# Without explicitly ignoring all branches, CircleCI will run the job on all branches | ||
# even if no tags have been pushed | ||
branches: | ||
ignore: /.*/ |