Skip to content
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
183 changes: 0 additions & 183 deletions .circleci/config.yml

This file was deleted.

File renamed without changes.
135 changes: 135 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: Main
on:
push:
branches:
- main

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Install tools
uses: infrablocks/github-actions/asdf_install@v1
- name: Check
run: ./go library:check
- name: Notify Slack
if: ${{ !cancelled() }}
continue-on-error: true
run: ./go "slack:notify[${{ job.status }}]"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Install tools
uses: infrablocks/github-actions/asdf_install@v1
- name: Test
run: ./go test:unit
- name: Notify Slack
if: ${{ !cancelled() }}
continue-on-error: true
run: ./go "slack:notify[${{ job.status }}]"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

prerelease:
needs: [check, test]
runs-on: ubuntu-latest
timeout-minutes: 30
# Job-level group (here and on release): a run awaiting release approval
# holds the slot, and a workflow-level group would freeze all main CI for
# the approval window. queue: max keeps every queued run; the default
# cancels all but the newest.
concurrency:
group: main
cancel-in-progress: false
queue: max
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Install tools
uses: infrablocks/github-actions/asdf_install@v1
- name: Install secrets tools
run: ./scripts/ci/common/install-git-crypt.sh
- name: Unlock git-crypt
run: ./go git_crypt:unlock_with_encrypted_gpg_key
env:
ENCRYPTION_PASSPHRASE: ${{ secrets.ENCRYPTION_PASSPHRASE }}
- name: Configure RubyGems credentials
run: ./scripts/ci/common/configure-rubygems.sh
- name: Set CI git author
run: ./go repository:set_ci_author
- name: Bump version
run: ./go "version:bump[pre]"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Safety — plan concern (§1 parity, D5 inherited hazard; not blocking)

./go release pushes the gem to RubyGems before the subsequent git push / git push --tags steps. If the push fails (e.g. main advanced during the run) the version is already published and irreversible, but no matching commit/tag exists in the repo, and the next run collides on the version. Inherited from the untouched ./go release logic and explicitly flagged as deliberate; a fleet-wide reorder is post-migration work.

- name: Release
run: ./go release
- name: Push commits
run: git push
- name: Push tags
run: git push --tags
- name: Notify Slack of release hold
continue-on-error: true
run: ./go "slack:notify[success,on_hold]"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: Notify Slack
if: ${{ !cancelled() }}
continue-on-error: true
run: ./go "slack:notify[${{ job.status }}]"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

release:
needs: [prerelease]
runs-on: ubuntu-latest
timeout-minutes: 30
environment: release
concurrency:
group: main
cancel-in-progress: false
queue: max
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Pull latest main
# Publishes main as of approval time, not the SHA that triggered the
# run; --ff-only so a non-fast-forward fails loudly
run: git pull --ff-only
- name: Install tools
uses: infrablocks/github-actions/asdf_install@v1
- name: Install secrets tools
run: ./scripts/ci/common/install-git-crypt.sh
- name: Unlock git-crypt
run: ./go git_crypt:unlock_with_encrypted_gpg_key
env:
ENCRYPTION_PASSPHRASE: ${{ secrets.ENCRYPTION_PASSPHRASE }}
- name: Configure RubyGems credentials
run: ./scripts/ci/common/configure-rubygems.sh
- name: Set CI git author
run: ./go repository:set_ci_author
- name: Bump version
run: ./go "version:bump[minor]"
- name: Release
run: ./go release
- name: Push commits
run: git push
- name: Push tags
run: git push --tags
- name: Notify Slack
if: ${{ !cancelled() }}
continue-on-error: true
run: ./go "slack:notify[${{ job.status }}]"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
Loading
Loading