forked from microsoft/chat-copilot
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.74 KB
/
copilot-build-frontend.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
name: copilot-build-frontend
on:
workflow_dispatch:
pull_request:
branches: ["aaronba-frontend-actions-build"]
paths:
- "webapp/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
webapp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18
cache: "yarn"
cache-dependency-path: "webapp/yarn.lock"
- name: Run yarn install, yarn build, & yarn format
run: |
#!/usr/bin/env bash
set -e # exit with nonzero exit code if anything fails
echo "Running yarn install, yarn build, & yarn format"
yarn install --frozen-lockfile # install dependencies and ensure lockfile is unchanged.
yarn build # run build script
yarn format # run format script
working-directory: webapp
#- name: Determine version
# id: gitversion
# uses: gittools/actions/gitversion/execute@v1
- name: Set version tag
id: versiontag
run: |
$VERSION_TAG = "1."
$VERSION_TAG += "1."
$VERSION_TAG += "1"
echo $VERSION_TAG
Write-Output "versiontag=$VERSION_TAG" >> $env:GITHUB_OUTPUT
- name: Upload package to artifacts
uses: actions/upload-artifact@v4
with:
name: copilotchat-webapp-${{ steps.versiontag.outputs.versiontag }}
path: ${{ github.workspace }}\webapp\build
- name: "Set outputs"
id: artifactoutput
run: Write-Output "artifactname=copilotchat-webapp-${{ steps.versiontag.outputs.versiontag }}" >> $env:GITHUB_OUTPUT