Skip to content

Commit

Permalink
ci: fix releasing (#42)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?

- Circle CI wouldn't run the new `publish_github` job.

## Short description of the changes

- The "always match" filter needed to be added to the `setup` job else
it wouldn't run for tagging events and thereby prevent `publish_github`
from running.
- Use the `go` executor instead of `github` so we can have the make
command.
- Arrange for `publish_github` after tests pass because we shouldn't
release things that could be broken!
  • Loading branch information
robbkidd authored Dec 2, 2022
1 parent e452e19 commit 0356ba0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ executors:
- image: cimg/go:1.<< parameters.goversion >>
environment:
GO111MODULE: "on"
github:
docker:
- image: cibuilds/github:0.13.0

jobs:
setup:
Expand Down Expand Up @@ -69,19 +66,23 @@ jobs:
field_value: << parameters.goversion >>

publish_github:
executor: github
executor: go
steps:
- attach_workspace:
at: ~/
- checkout
- run:
name: Install ghr for drafting GitHub Releases
command: go install github.com/tcnksm/ghr@latest
- run:
name: "create draft release at GitHub"
command: make publish_github

workflows:
build:
jobs:
- setup
- setup:
<<: *filters_always
- watch:
<<: *filters_always
requires:
- setup
- test:
Expand All @@ -93,4 +94,4 @@ workflows:
<<: *filters_publish
context: Honeycomb Secrets for Public Repos
requires:
- setup
- test

0 comments on commit 0356ba0

Please sign in to comment.