Skip to content

Update Local Notice Files #315

Update Local Notice Files

Update Local Notice Files #315

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
permissions:
contents: write
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
GenerateNoticeUseLocalFile: false
GenerateNoticeUpdateLocalFile: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- 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/net8.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/net8.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@v5
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