Skip to content

Commit bf1c8d2

Browse files
ci: set build tag for Analog [skip ci]
1 parent fdda6f8 commit bf1c8d2

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

.github/workflows/test-release.yml

+11-12
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ name: Release Test
33
on:
44
workflow_dispatch:
55
inputs:
6+
analog_build_tag:
7+
description: 'Analog Build Tag'
8+
required: true
9+
default: 'latest'
10+
type: choice
11+
options:
12+
- latest
13+
- beta
614
angular_build_tag:
715
description: 'Angular Build Tag'
816
required: true
@@ -27,11 +35,8 @@ jobs:
2735
- uses: actions/setup-node@v3
2836
- run: corepack enable
2937
- run: npm --version
30-
- name: Set Release Tag
31-
run: |
32-
TAG="$(${{ github.ref_name == 'main' }} && echo 'latest' || echo '${{ github.ref_name }}')"
3338
- name: Create Analog Application
34-
run: npm create analog@$TAG analog-app -- --skipTailwind --analogSFC=false --template latest
39+
run: npm create analog@${{ inputs.analog_build_tag }} analog-app -- --skipTailwind --analogSFC=false --template latest
3540
- name: Build, Test, and Validate
3641
run: |
3742
cd analog-app
@@ -46,12 +51,9 @@ jobs:
4651
- uses: actions/setup-node@v3
4752
- run: corepack enable
4853
- run: npm --version
49-
- name: Set Release Tag
50-
run: |
51-
TAG="$(${{ github.ref_name == 'main' }} && echo 'latest' || echo '${{ github.ref_name }}')"
5254
- name: Create Nx Workspace
5355
run: |
54-
npx create-nx-workspace@${{ inputs.nx_build_tag }} analog-nx-workspace --preset @analogjs/platform@$TAG --analogAppName my-analog-app --addTailwind=false --addTRPC=false --ci skip
56+
npx create-nx-workspace@${{ inputs.nx_build_tag }} analog-nx-workspace --preset @analogjs/platform@${{ inputs.analog_build_tag }} --analogAppName my-analog-app --addTailwind=false --addTRPC=false --ci skip
5557
- name: Build, Test, and Validate
5658
run: |
5759
cd analog-nx-workspace
@@ -66,16 +68,13 @@ jobs:
6668
- uses: actions/setup-node@v3
6769
- run: corepack enable
6870
- run: npm --version
69-
- name: Set Release Tag
70-
run: |
71-
TAG="$(${{ github.ref_name == 'main' }} && echo 'latest' || echo '${{ github.ref_name }}')"
7271
- name: Create Angular App
7372
run: |
7473
npx @angular/cli@${{ inputs.angular_build_tag }} new my-angular-app --style css --no-ssr
7574
- name: Migrate, Build, Test, and Validate
7675
run: |
7776
cd my-angular-app
78-
npm install @analogjs/platform@$TAG --save-dev
77+
npm install @analogjs/platform@${{ inputs.analog_build_tag }} --save-dev
7978
npx ng g @analogjs/platform:init --project my-angular-app --vitest=true
8079
npm run build
8180
npm run test

0 commit comments

Comments
 (0)