Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.github/workflows: split release into pre-release-ci and release (manual) #164

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/pre-release-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: pre-release-ci
on:
push:
tags:
- 'v*'
jobs:
acceptance-test:
name: acceptance-test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.18

- name: Tests
run: make testacc
env:
COCKROACH_API_KEY: ${{ secrets.COCKROACH_API_KEY }}
35 changes: 6 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This GitHub action can publish assets for release when a tag is created.
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
# Currently its setup to be triggered manually via the GitHUB UI. We should
# only run this on a tag that matches the pattern "v*" (ie. v0.1.0) *after*
# validating that the release can be signed off (e.g. by triaging the
# pre-release-ci workflow).
#
# This uses an action (hashicorp/ghaction-import-gpg) that assumes you set your
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
Expand All @@ -8,38 +11,12 @@
#
# You will need to pass the `--batch` flag to `gpg` in your signing step
# in `goreleaser` to indicate this is being used in a non-interactive mode.
#
name: release
on:
push:
tags:
- 'v*'
name: release (manually, after pre-release-ci)
on: workflow_dispatch
permissions:
contents: write
jobs:
# pre job to run acceptance tests
acceptance-test:
name: acceptance-test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.18

- name: Tests
run: make testacc
env:
COCKROACH_API_KEY: ${{ secrets.COCKROACH_API_KEY }}

goreleaser:
needs: acceptance-test
runs-on: ubuntu-latest
steps:
-
Expand Down