-
Notifications
You must be signed in to change notification settings - Fork 756
92 lines (71 loc) · 3.4 KB
/
update-notices.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Update Local Notice Files
# This action can be run on-demand against a branch or scheduled every day.
# It updates the checked-in TPN files and creates a PR with the changes.
on:
workflow_dispatch:
schedule:
- cron: 0 9 * * *
jobs:
main:
name: Update Local Notice Files
# has to be windows because of the windows installer project
runs-on: windows-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
GenerateNoticeUseLocalFile: false
GenerateNoticeUpdateLocalFile: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Build Bicep.sln
run: dotnet build --configuration Release
- name: Pack
run: dotnet pack --configuration Release
- name: Publish Language Server
run: dotnet publish --configuration Release ./src/Bicep.LangServer/Bicep.LangServer.csproj
# this command is not correct for releasing the binaries but is sufficient for the purposes of this job
- name: Windows Installer prerequisites
run: mkdir ./src/installer-win/bicep && copy ./src/Bicep.Cli/obj/project.assets.json ./src/installer-win/bicep/ && copy ./src/Bicep.Cli/bin/Release/net7.0/bicep.* ./src/installer-win/bicep/
- name: Build Windows Installer
run: dotnet build --configuration Release ./src/installer-win/installer.proj
- name: CLI Package prerequisites
run: mkdir ./src/Bicep.Cli.Nuget/tools && copy ./src/Bicep.Cli/obj/project.assets.json ./src/Bicep.Cli.Nuget/tools/ && copy ./src/Bicep.Cli/bin/Release/net7.0/bicep.* ./src/Bicep.Cli.Nuget/tools/
- name: Build CLI Package
run: dotnet build --configuration Release /p:RuntimeSuffix=win-x64 ./src/Bicep.Cli.Nuget/nuget.proj
- name: VSIX Notice prerequisites
run: mkdir ./src/vscode-bicep-notice/inputs && copy ./src/Bicep.LangServer/obj/project.assets.json ./src/vscode-bicep-notice/inputs/
- name: npm ci
run: npm ci
working-directory: ./src/vscode-bicep
- name: npm list -a -json
run: npm list -a --json > ../vscode-bicep-notice/inputs/npm-list.json
working-directory: ./src/vscode-bicep
- name: Generate VSIX notice
run: dotnet build --configuration Release ./src/vscode-bicep-notice/vscode-bicep-notice.proj
- name: Build BicepInVisualStudio.sln
run: msbuild src/vs-bicep/BicepInVisualStudio.sln /restore -property:Configuration=Release /v:m
- name: Create branch and force push
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update Local TPN Files
commit_user_name: ${{ github.actor }}
commit_user_email: ${{ github.actor }}@users.noreply.github.com
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
file_pattern: '*.txt'
branch: update-local-tpn-files
commit_options: '--no-verify --signoff'
status_options: '--untracked-files=no'
push_options: '--force'
skip_fetch: true
skip_checkout: true
create_branch: true