forked from valkey-io/valkey
-
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.
- Loading branch information
1 parent
28cf157
commit a7328b7
Showing
2 changed files
with
88 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Build Release Packages | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version of Valkey to build | ||
required: true | ||
default: unstable | ||
|
||
# We do not want a new release build to run whilst we are releasing the current release build. | ||
# We also do not want multiples to run for the same version. | ||
concurrency: staging-build-release | ||
|
||
jobs: | ||
# This job provides the version metadata from the tag for the other jobs to use. | ||
staging-build-get-meta: | ||
name: Get metadata to build | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.get_version.outputs.VERSION }} | ||
steps: | ||
|
||
- run: | | ||
echo "Version: ${{ inputs.version || github.ref_name }}" | ||
shell: bash | ||
# This step is to consolidate the three different triggers into a single "version" | ||
# 1. If manual dispatch - use the version provided. | ||
# 2. If cron/regular build - use master. | ||
# 3. If tag trigger, use that tag. | ||
- name: Get the version | ||
id: get_version | ||
run: | | ||
VERSION="${INPUT_VERSION}" | ||
if [ -z "${VERSION}" ]; then | ||
echo "Defaulting to master" | ||
VERSION=master | ||
fi | ||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | ||
shell: bash | ||
env: | ||
# Use the dispatch variable in preference, if empty use the context ref_name which should | ||
# only ever be a tag or the master branch for cron builds. | ||
INPUT_VERSION: ${{ inputs.version || github.ref_name }} |
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