-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change implements two workflows that together implement the release process. The first workflow is manually triggered, takes a human-specified semver version string, and creates an automated commit that updates the version string in the required places, and then tags the new commit. The second workflow is triggered on release semver tags, and performs the build and creates the release. Tested: no - these workflows are hard to test manually, and will likely require trial+error on Github itself. Bug: linear/CUS-332
- Loading branch information
1 parent
83613d6
commit f614276
Showing
7 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "release" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: string | ||
description: Version of engflow_auth to release | ||
required: true | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: release | ||
run: | | ||
infra/release.sh "${{ github.events.inputs.version }}" | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
readonly RELEASE_VERSION="$1" | ||
|
||
# Bump version in applicable files | ||
sed -i "s|version = \".+\",|version = \"${RELEASE_VERSION}\",|" MODULE.bazel | ||
|
||
# Commit and push, adding a tag | ||
git commit \ | ||
-a \ | ||
-m "release: Bump version to v${RELEASE_VERSION}" | ||
git tag \ | ||
-a \ | ||
"v${RELEASE_VERSION}" \ | ||
-m "Release v${RELEASE_VERSION}" | ||
git push \ | ||
--follow-tags | ||
|
||
# Build release artifacts | ||
bazel build \ | ||
--config=release \ | ||
-- \ | ||
//:release_artifacts | ||
|
||
# Create release | ||
gh release create \ | ||
"v${RELEASE_VERSION}" \ | ||
--generate-notes \ | ||
"bazel-out/k8-opt-ST-*/bin/cmd/engflow_auth/engflow_auth_linux_x64#engflow_auth (Linux, x64)" \ | ||
"bazel-out/k8-opt-ST-*/bin/cmd/engflow_auth/engflow_auth_macos_arm64#engflow_auth (macOS, arm64)" \ | ||
"bazel-out/k8-opt-ST-*/bin/cmd/engflow_auth/engflow_auth_windows_x64#engflow_auth (Windows, x64)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
"""Contains visibility constants to reduce duplication, increase BUILD file readability""" | ||
|
||
# Visibility used for artifacts that get released, which are defined by | ||
# filegroup(s) in the top-level BUILD file. | ||
RELEASE_ARTIFACT = ["//:__pkg__"] |