-
Notifications
You must be signed in to change notification settings - Fork 9
74 lines (73 loc) · 2.46 KB
/
deployRelease.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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_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_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 }}