microsoft/TypeAgent

Public

mirrored fromhttps://github.com/microsoft/TypeAgentAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.1.4-py

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/build-package-shell.yml

89lines · modecode

1# Copyright (c) Microsoft Corporation.
2# Licensed under the MIT License.
3
4# This workflow will build and package the TypeAgent TypeScript code
5
6name: build-package-shell
7
8on:
9 workflow_dispatch:
10 push:
11 branches: ["main"]
12 pull_request:
13 branches: ["main"]
14 merge_group:
15 branches: ["main"]
16
17concurrency:
18 group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19 cancel-in-progress: true
20
21permissions:
22 pull-requests: read
23 contents: read
24
25env:
26 ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron
27 ELECTRON_BUILDER_CACHE: ${{ github.workspace }}/.cache/electron-builder
28
29jobs:
30 build_package_shell:
31 strategy:
32 fail-fast: false
33 matrix:
34 os: ["ubuntu-latest", "windows-latest", "macos-latest"]
35 version: [22]
36
37 runs-on: ${{ matrix.os }}
38
39 steps:
40 - name: Setup Git LF
41 run: |
42 git config --global core.autocrlf false
43 - uses: actions/checkout@v4
44 - uses: dorny/paths-filter@v3
45 id: filter
46 continue-on-error: true
47 with:
48 filters: |
49 ts:
50 - "ts/**"
51 - ".github/workflows/build-package-shell.yml"
52 - uses: pnpm/action-setup@v4
53 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts != 'false' }}
54 name: Install pnpm
55 with:
56 package_json_file: ts/package.json
57 - uses: actions/setup-node@v4
58 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts != 'false' }}
59 with:
60 node-version: ${{ matrix.version }}
61 cache: "pnpm"
62 cache-dependency-path: ts/pnpm-lock.yaml
63 - name: Install dependencies
64 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts != 'false' }}
65 working-directory: ts
66 run: |
67 pnpm install --frozen-lockfile --strict-peer-dependencies
68 - name: Build
69 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts != 'false' }}
70 working-directory: ts
71 run: |
72 pnpm run build:shell
73 env:
74 DEBUG_DEMB: true
75 - name: Electron Builder Cache
76 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts != 'false' }}
77 uses: actions/cache@v4
78 with:
79 key: electron | ${{ runner.os }} | ${{ runner.arch }} | ${{ hashFiles('**/pnpm-lock.yaml') }}
80 path: |
81 ${{ env.ELECTRON_BUILDER_CACHE }}
82 ${{ env.ELECTRON_CACHE }}
83 restore-keys: |
84 electron | ${{ runner.os }} | ${{ runner.arch }}
85 - name: Package - shell
86 if: ${{ github.event_name != 'pull_request' || steps.filter.outputs.ts != 'false' }}
87 working-directory: ts
88 shell: bash
89 run: pnpm run shell:package
90