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
20 changes: 11 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,27 @@ on:
type: string
description: Version of engflow_auth to release; must be a semver version string, starting with `v`
required: true
dry_run:
type: boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

description: "Dry run: if checked, all artifacts are built, but no release is created."
required: true

permissions:
contents: write

env:
# Recommended here: https://github.com/bazelbuild/bazelisk/issues/88#issuecomment-625178467
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRY_RUN: ${{ inputs.dry_run }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
release:
runs-on:
- self-hosted
- os=linux
- arch=x64
- "engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian12-dind-x64@sha256:763903935682de148b4e09fe1d7ef3bbc4ec829d59c3f41cb9519984639eaa06"
- "engflow-container-image=docker://645088952840.dkr.ecr.eu-west-1.amazonaws.com/engflow-ci/debian11-dind-x64@sha256:604855f1ecd6edad3f45f513ed0112b9e8e32589871133767a1a51944b07f487"
- "engflow-pool=ci_sysbox_x64"
- "engflow-runtime=sysbox-runc"
- "engflow-runner-id=${{ github.repository_id }}_release_${{ github.run_id }}_${{ github.run_number }}_${{ github.run_attempt }}"
Expand All @@ -40,15 +50,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Log in
run: infra/login.sh

- name: release
if: success()
run: |
infra/release.sh "${{ inputs.version }}"
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Log out
run: infra/logout.sh
6 changes: 4 additions & 2 deletions infra/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ echo "[START] Building artifacts"
BUILD_RELEASE_VERSION="${RELEASE_VERSION}" \
bazel build \
--config=release \
--config=engflow \
--config=remote_linux_x64 \
-- \
//:release_artifacts
echo "[FINISH] Building artifacts"
Expand Down Expand Up @@ -125,6 +123,10 @@ cp \
echo "[FINISH] Staging artifacts"

# Create release
if [[ "${DRY_RUN}" == true ]]; then
echo "[SKIP] Creating release"
exit 0
fi
echo "[START] Creating release"
${GH_CLI} release create \
"${RELEASE_VERSION}" \
Expand Down