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
31 changes: 17 additions & 14 deletions .github/workflows/vortex-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,30 +99,31 @@ jobs:
path: .vortex/installer/build/installer.phar
if-no-files-found: error

# Build the other major's installer from its '{N}.x' branch so it is
# published alongside the current one. Checked out into a separate path so
# the current installer build above is untouched. Mirrors how the docs job
# pulls the other major's branch content.
# Build the other major from its '{N}.x' branch so it is published
# alongside the current one. Checked out into a separate path so the
# build above is untouched. Mirrors how the docs job pulls the other
# major's branch content. Each major builds whatever it ships - the
# installer above, the CLI here - so this leg keeps its own paths.
- name: Checkout v${{ env.OTHER_MAJOR }} branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ env.OTHER_MAJOR }}.x
path: vortex-v${{ env.OTHER_MAJOR }}
persist-credentials: false

- name: Build v${{ env.OTHER_MAJOR }} installer
- name: Build v${{ env.OTHER_MAJOR }} binary
run: |
composer install
sed -i "s/\"vortex-installer-version\": \"development\"/\"vortex-installer-version\": \"${OTHER_MAJOR}.x-dev\"/g" box.json
sed -i "s/\"vortex-cli-version\": \"development\"/\"vortex-cli-version\": \"${OTHER_MAJOR}.x-dev\"/g" box.json
composer build
./build/installer.phar --version
working-directory: vortex-v${{ env.OTHER_MAJOR }}/.vortex/installer
./.build/vortex.phar --version
working-directory: vortex-v${{ env.OTHER_MAJOR }}/.vortex/cli

- name: Upload v${{ env.OTHER_MAJOR }} installer artifact
- name: Upload v${{ env.OTHER_MAJOR }} artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: vortex-installer-v${{ env.OTHER_MAJOR }}
path: vortex-v${{ env.OTHER_MAJOR }}/.vortex/installer/build/installer.phar
path: vortex-v${{ env.OTHER_MAJOR }}/.vortex/cli/.build/vortex.phar
if-no-files-found: error

vortex-release-docs:
Expand Down Expand Up @@ -183,20 +184,22 @@ jobs:
name: vortex-installer-v2
path: installer-v2

# Publish both installers. '/v1/install' and '/v2/install' are the stable
# Publish both majors. '/v1/install' and '/v2/install' are the stable
# per-major pins, always built from each major's own source. The bare
# '/install' is a copy of the current major's pin, selected by the
# 'VORTEX_CURRENT_MAJOR' repository variable (default 1) - bumping that one
# variable is the only action needed to promote a new major.
- name: Copy installers to docs
- name: Copy binaries to docs
run: |
case "${CURRENT_MAJOR}" in
1|2) ;;
*) echo "Invalid VORTEX_CURRENT_MAJOR='${CURRENT_MAJOR}'. Expected 1 or 2."; exit 1 ;;
esac
mkdir -p ../.vortex/docs/static/v1 ../.vortex/docs/static/v2
cp ../installer-v1/installer.phar ../.vortex/docs/static/v1/install
cp ../installer-v2/installer.phar ../.vortex/docs/static/v2/install
# Each artifact holds exactly one PHAR, but its filename depends on
# what that major ships, so it is matched rather than named.
cp ../installer-v1/*.phar ../.vortex/docs/static/v1/install
cp ../installer-v2/*.phar ../.vortex/docs/static/v2/install
cp "../.vortex/docs/static/v${CURRENT_MAJOR}/install" ../.vortex/docs/static/install
php ../.vortex/docs/static/install --version

Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/vortex-test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ jobs:
git -C "${{ github.workspace }}" checkout "origin/${OTHER_MAJOR}.x" -- .vortex/docs/content || { echo "Failed to check out content from ${OTHER_MAJOR}.x."; exit 1; }
working-directory: '${{ github.workspace }}/.vortex/docs'

# On the main deploy, publish both installers to match the multi-version
# On the main deploy, publish both majors to match the multi-version
# docs: '/v1/install' and '/v2/install' are the stable per-major pins and
# the bare '/install' is a copy of the current major's pin (the
# 'VORTEX_CURRENT_MAJOR' repository variable, default 1). The downloaded
# installer above is the current major (built from 'main'); the other
# binary above is the current major (built from 'main'); the other
# major is built from its '{N}.x' branch. Mirrors 'vortex-release.yml'.
- name: Checkout v${{ env.OTHER_MAJOR }} branch
if: github.event.workflow_run.head_branch == 'main'
Expand All @@ -121,19 +121,21 @@ jobs:
path: vortex-v${{ env.OTHER_MAJOR }}
persist-credentials: false

- name: Build and publish v${{ env.OTHER_MAJOR }} installer
# Each major builds whatever it ships - the installer here, the CLI on
# '2.x' - so this leg keeps its own paths, box token and PHAR name.
- name: Build and publish v${{ env.OTHER_MAJOR }} binary
if: github.event.workflow_run.head_branch == 'main'
run: |
case "${CURRENT_MAJOR}" in
1|2) ;;
*) echo "Invalid VORTEX_CURRENT_MAJOR='${CURRENT_MAJOR}'. Expected 1 or 2."; exit 1 ;;
esac
composer --working-dir="vortex-v${OTHER_MAJOR}/.vortex/installer" install
sed -i "s/\"vortex-installer-version\": \"development\"/\"vortex-installer-version\": \"${OTHER_MAJOR}.x-dev\"/g" "vortex-v${OTHER_MAJOR}/.vortex/installer/box.json"
composer --working-dir="vortex-v${OTHER_MAJOR}/.vortex/installer" build
composer --working-dir="vortex-v${OTHER_MAJOR}/.vortex/cli" install
sed -i "s/\"vortex-cli-version\": \"development\"/\"vortex-cli-version\": \"${OTHER_MAJOR}.x-dev\"/g" "vortex-v${OTHER_MAJOR}/.vortex/cli/box.json"
composer --working-dir="vortex-v${OTHER_MAJOR}/.vortex/cli" build
mkdir -p .vortex/docs/static/v1 .vortex/docs/static/v2
cp .vortex/docs/static/install ".vortex/docs/static/v${CURRENT_MAJOR}/install"
cp "vortex-v${OTHER_MAJOR}/.vortex/installer/build/installer.phar" ".vortex/docs/static/v${OTHER_MAJOR}/install"
cp "vortex-v${OTHER_MAJOR}/.vortex/cli/.build/vortex.phar" ".vortex/docs/static/v${OTHER_MAJOR}/install"
cp ".vortex/docs/static/v${CURRENT_MAJOR}/install" .vortex/docs/static/install

- name: Build documentation site
Expand Down