Deploy Release #172
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
name: Deploy Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version" | |
required: true | |
# This workflow is split into release and prerelease jobs so that the | |
# release job can require a manual approval. Otherwise, the release and | |
# prerelease jobs should be identical. | |
jobs: | |
validate: | |
name: "Validate" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: adobe/project-card-release-automation/validate-version@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
version: ${{ github.event.inputs.version }} | |
release: | |
name: "Release" | |
runs-on: ubuntu-latest | |
needs: validate | |
# this environment requires manual approval | |
environment: Production | |
# final release versions do not contain '-' | |
if: ${{ contains(github.event.inputs.version, '-') == false }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.ALLOY_BOT_GITHUB_SSH_PRIVATE_KEY }} | |
- run: ./scripts/deploy.sh ${{ github.event.inputs.version }} | |
env: | |
REACTOR_IO_INTEGRATION_PRIVATE_KEY_CONTENTS: ${{ secrets.REACTOR_IO_INTEGRATION_PRIVATE_KEY_CONTENTS }} | |
REACTOR_IO_INTEGRATION_CLIENT_SECRET: ${{ secrets.REACTOR_IO_INTEGRATION_CLIENT_SECRET }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: package | |
path: ./package-adobe-alloy-${{ github.event.inputs.version }}.zip | |
prerelease: | |
name: "Prerelease" | |
runs-on: ubuntu-latest | |
needs: validate | |
# prerelease versions contain '-' | |
if: ${{ contains(github.event.inputs.version, '-') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.ALLOY_BOT_GITHUB_SSH_PRIVATE_KEY }} | |
- run: ./scripts/deploy.sh ${{ github.event.inputs.version }} | |
env: | |
REACTOR_IO_INTEGRATION_PRIVATE_KEY_CONTENTS: ${{ secrets.REACTOR_IO_INTEGRATION_PRIVATE_KEY_CONTENTS }} | |
REACTOR_IO_INTEGRATION_CLIENT_SECRET: ${{ secrets.REACTOR_IO_INTEGRATION_CLIENT_SECRET }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: package | |
path: ./package-adobe-alloy-${{ github.event.inputs.version }}.zip | |
record: | |
name: "Record Version" | |
runs-on: ubuntu-latest | |
needs: [prerelease, release] | |
if: failure() == false | |
steps: | |
- uses: adobe/project-card-release-automation/record-release@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
version: ${{ github.event.inputs.version }} |