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
14 changes: 13 additions & 1 deletion .github/workflows/common-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,26 @@ jobs:
# NOT push back: the branch needs no mutation, pushing would need write
# access to the release branch, and src/version.ts is not path-ignored so
# a push-back would re-trigger this workflow in a loop.
# Skipped entirely when the branch already carries the released version
# (the PR bumped it by hand): nothing to commit, and no push to a
# protected branch is attempted.
- name: Commit Changes
if: ${{ inputs.release-type == 'beta' || inputs.release-type == 'public' }}
run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com
# The bump above ran on the detached tag checkout. Drop it, move to the
# source branch, and re-apply it there so the checkout cannot fail on
# local changes when the branch head has moved past the tag.
git checkout -- ${{ inputs.package-dir }}/package.json ${{ inputs.package-dir }}/src/version.ts
git checkout ${{ env.branch_name }}
./scripts/bump_version.sh "${{ inputs.product }}" "${{ steps.version.outputs.value }}"
if git diff --quiet -- ${{ inputs.package-dir }}/package.json ${{ inputs.package-dir }}/src/version.ts; then
echo "${{ inputs.product }} is already at ${{ steps.version.outputs.value }} on ${{ env.branch_name }}; skipping the version-bump commit."
exit 0
fi
git add ${{ inputs.package-dir }}/package.json ${{ inputs.package-dir }}/src/version.ts
git commit -m "[AUTOMATED] Release ${{ inputs.product }} - ${{ steps.version.outputs.value }}" || echo "nothing to commit"
git commit -m "[AUTOMATED] Release ${{ inputs.product }} - ${{ steps.version.outputs.value }}"
git push origin ${{ env.branch_name }}

- name: Publish
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/internal-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ name: Internal Release
# Branch-namespaced internal (JFrog) builds, routed per product:
# flowvault-release/* -> skyflow-flowvault-node
# skyvault-release/* | release/* -> skyflow-node (legacy release/* kept for skyvault)
#
# Branch pushes only. A `tags-ignore` filter used to live here, but with one
# present GitHub runs the workflow for every tag it does NOT match, and its
# single-star pattern never matched prefixed tags such as flowvault/1.0.0, so a
# public release tag also fired an internal build. With only `branches` set,
# tag pushes never trigger this workflow.
on:
push:
tags-ignore:
- '*.*'
paths-ignore:
- 'package.json'
- 'package-lock.json'
Expand All @@ -18,6 +22,8 @@ on:

jobs:
call-common-workflow:
# Belt and braces: never run for a tag ref, whatever the trigger says.
if: startsWith(github.ref, 'refs/heads/')
uses: ./.github/workflows/common-release.yml
with:
product: ${{ startsWith(github.ref_name, 'flowvault-release/') && 'skyflow-flowvault-node' || 'skyflow-node' }}
Expand Down
Loading