Skip to content

Commit

Permalink
issue #47: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
vivalareda committed Dec 12, 2023
1 parent 31ae942 commit a27a4a2
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 24 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/validate-ts-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: TS version validation

on:
push:

env:
TYPESCRIPT_VERSION: ${{ secrets.TYPESCRIPT_VERSION }}
SCRIPT_PATH: "./scripts/extract-typescript-version.js"

jobs:
extract-version:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Extract Version
id: extract_version
run: node ${{ env.SCRIPT_PATH }}

- name: Check Version
run: |
if [ "${{ steps.extract_version.outputs.version }}" != "${{ env.TYPESCRIPT_VERSION }}" ]; then
echo "Please change the TypeScript version to ${{ env.TYPESCRIPT_VERSION }} in your _versions.ts file";
exit 1;
fi
42 changes: 19 additions & 23 deletions .github/workflows/vercel-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,27 @@ name: Vercel Preview Deployment

on:
push:

env:
TYPESCRIPT_VERSION: 0.1.1
SCRIPT_PATH: "./scripts/extract-typescript-version.js"
branches:
- main
pull_request:

jobs:
extract-version:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
lint-test:
uses: ai-cfia/github-workflows/.github/workflows/workflow-lint-test-node.yml@main

- name: Extract Version
id: extract_version
run: node ${{ env.SCRIPT_PATH }}
vercel-deployment-dev:
needs: lint-test
uses: ai-cfia/github-workflows/.github/workflows/workflow-vercel-deployment.yml@53-update-vercel-deployment-to-add-setup-node-step
with:
project-name: 'finesse-frontend'
deployment-environment: 'dev'
secrets: inherit

- name: Check Version
run: |
if [ "${{ steps.extract_version.outputs.version }}" != "${{ env.TYPESCRIPT_VERSION }}" ]; then
echo "You should be using typescript version ${{ env.TYPESCRIPT_VERSION }} ";
exit 1;
fi
vercel-deployment-uat:
if: github.ref == 'refs/heads/main'
uses: ai-cfia/github-workflows/.github/workflows/workflow-vercel-deployment.yml@53-update-vercel-deployment-to-add-setup-node-step
with:
project-name: 'finesse-frontend'
deployment-environment: 'uat'
secrets: inherit
2 changes: 1 addition & 1 deletion src/_versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface TsAppVersion {
gitTag?: string;
};
export const versions: TsAppVersion = {
version: '0.1.0',
version: '0.2.0',
name: 'finesse-frontend',
versionDate: '2023-12-04T21:25:19.734Z',
gitCommitHash: '1b203ac',
Expand Down

0 comments on commit a27a4a2

Please sign in to comment.