Skip to content

Commit

Permalink
chore: Stub of the release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista committed Jan 14, 2025
1 parent 91ce0e8 commit 6f6dbff
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ executors:

orbs:
go: circleci/[email protected]
utils: ethereum-optimism/[email protected]

commands:
# By default, CircleCI does not checkout any submodules
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand All @@ -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: /.*/

0 comments on commit 6f6dbff

Please sign in to comment.