-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (49 loc) · 2.13 KB
/
ts.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
### TypeScript installs with Node.js, which
### Chocolatey will install before TS.
### TS depends on the LTS version.
### Help: https://typescriptlang.org/docs/handbook/typescript-in-5-minutes.html
### By using this Action, you agree to
### the terms of the Apache License 2.0.
### apache.org/licenses/LICENSE-2.0.txt
name: Setup TypeScript
on: push
jobs:
install:
runs-on: windows-${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: ['2022', '2019']
steps:
- name: Install using choco
run: |
echo "::notice title=Chocolatey::Install ready."
echo "::group::How the process works"
choco install typescript --what-if --no-progress
echo "::endgroup::"
echo "::group::GitHub runner info"
echo "Microsoft Windows Server ${{ matrix.os }} running on the ${{ runner.name }} runner."
echo "Architecture: ${{ runner.arch }}"
echo "Pre-installed Tools: ${{ runner.tool_cache }}"
echo "::endgroup::"
choco install typescript --allow-unofficial --no-progress --log-file=C:chocolatey.log --yes
if($LASTEXITCODE -NE 0) {
echo "::error title=Windows Server ${{ matrix.os }}::Completed installation unsucessfully. Exit code $LASTEXITCODE."
}else {
echo "::notice title=Windows Server ${{ matrix.os }}::Completed installation sucessfully."
}
cd C:\
echo "::group::Detailed logs"
Write-Warning "Stop! This log is for developers only. Do not share any sensitive information since hackers could gain access to your GitHub account."
echo "--------------------------------------------------------------------------------------------------------------"
Get-Content chocolatey.log
echo "::endgroup::"
Exit $LASTEXITCODE
- name: Refresh env. registry for CMD
run: refreshenv
- name: Upload log
uses: actions/upload-artifact@v2
with:
name: Chocolatey logs for Windows ${{ matrix.os }}
path: C:\chocolatey.log
if-no-files-found: error