Bump Polly from 8.5.0 to 8.5.1 in /src #159
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- '.github/workflows/Deploy_Desktop.yml' | |
- 'src/DesktopClient/**' | |
- '*..md' | |
- 'docs/*..md' | |
- 'Build/**' | |
- 'chocolatey/**' | |
pull_request: | |
branches: [ main ] | |
paths-ignore: | |
- '.github/workflows/Deploy_Desktop.yml' | |
- 'src/DesktopClient/**' | |
- '*..md' | |
- 'docs/*..md' | |
- 'Build/**' | |
- 'chocolatey/**' | |
jobs: | |
Setup_Web: | |
name: Setup Web | |
runs-on: ubuntu-latest | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
DOTNET_NOLOGO: true | |
BuildConfiguration: Release | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Use .NET Core SDK 8.0.x and 9.0.x | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
8.0.x | |
9.0.x | |
- name: Nerdbank.GitVersioning | |
uses: dotnet/nbgv@v0.4.2 | |
with: | |
setCommonVars: true | |
- run: echo "BuildNumber - ${{ env.GitBuildVersionSimple }}" | |
- name: Add Secrets to appsettings.json | |
run: | | |
./Build/scripts/update-web-settings.ps1 -Version "${{ env.GitBuildVersionSimple }}" -ApplicationId "${{ secrets.ApplicationId }}" ` | |
-ClientSecret "${{ secrets.ClientSecret }}" -InstrumentationKey "${{ secrets.InstrumentationKey }}" ` | |
-LIFXClientId "${{ secrets.LIFXClientId }}" -LIFXClientSecret "${{ secrets.LIFXClientSecret }}" ` | |
-RemoteHueClientId "${{ secrets.RemoteHueClientId }}" -RemoteHueClientSecret "${{ secrets.RemoteHueClientSecret }}" ` | |
-RemoteHueClientAppName "${{ secrets.RemoteHueClientAppName }}" | |
shell: pwsh | |
if: ${{ success() && github.event_name != 'pull_request' }} | |
- name: Create Version File to Artifact | |
run : | | |
New-Item -Path ./Build -Name "version.txt" -ItemType "file" -Value "${{ env.GitBuildVersionSimple }}" | |
shell: pwsh | |
- name: Publish PreBuild Arifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ./src | |
name: PreBuild | |
- name: Publish Files for Build | |
uses: actions/upload-artifact@v4 | |
with: | |
path: Build | |
name: BuildArtifacts | |
if: ${{ success() }} | |
Build_Web: | |
name: Build Web | |
needs: Setup_Web | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- ChannelName: Windows_x64_x86 | |
RID: win-x64 | |
- ChannelName: Windows_ARM | |
RID: win-arm64 | |
- ChannelName: macOS | |
RID: osx-x64 | |
- ChannelName: Linux_ARM | |
RID: linux-arm | |
- ChannelName: Linux_ARM64 | |
RID: linux-x64 | |
- ChannelName: Linux_Musl_x64 | |
RID: linux-musl-x64 | |
- ChannelName: Linux_Musl_ARM_x64 | |
RID: linux-musl-arm64 | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
DOTNET_NOLOGO: true | |
BuildConfiguration: Release | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
steps: | |
- name: Use .NET Core SDK 8.0.x and 9.0.x | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
8.0.x | |
9.0.x | |
- name: Download PreBuild | |
uses: actions/download-artifact@v4 | |
with: | |
name: PreBuild | |
path: ./src | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: BuildArtifacts | |
path: ./BuildArtifacts | |
- name: Get Version from Artifact | |
run: | | |
version=$(<"${{ github.workspace }}/BuildArtifacts/version.txt") | |
echo "GitBuildVersionSimple=$version" >> $GITHUB_ENV | |
- name: Create Directory for ${{ matrix.ChannelName }} Channel | |
run: mkdir ./${{ matrix.ChannelName }} | |
- name: dotnet publish ${{ matrix.RID }} | |
run: dotnet publish './src/PresenceLight.Web/PresenceLight.Web.csproj' -r ${{ matrix.RID }} -c ${{ env.BuildConfiguration }} /p:PublishSingleFile=true -o ./PresenceLight.${{ env.GitBuildVersionSimple }}_${{ matrix.ChannelName }} /p:Version=${{ env.GitBuildVersionSimple }} --property WarningLevel=0 | |
if: ${{ success() }} | |
- name: Zip PresenceLight Web Files | |
run: | | |
Compress-Archive -Path './PresenceLight.${{ env.GitBuildVersionSimple }}_${{ matrix.ChannelName }}' ` | |
-DestinationPath ./${{ matrix.ChannelName }}/PresenceLight.${{ matrix.ChannelName }}.${{ env.GitBuildVersionSimple }}.zip | |
shell: pwsh | |
- name: Publish ${{ matrix.ChannelName }} Arifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ./${{ matrix.ChannelName }} | |
name: ${{ matrix.ChannelName }} | |
Code_Signing: | |
name: Code Sign Worker | |
needs: Build_Web | |
strategy: | |
matrix: | |
target: [ Windows_x64_x86, Windows_ARM, macOS, Linux_ARM, Linux_ARM64, Linux_Musl_x64, Linux_Musl_ARM_x64 ] | |
uses: isaacrlevin/presencelight/.github/workflows/Sign.yml@main | |
with: | |
target: ${{ matrix.target }} | |
secrets: inherit | |
Deploy_Azure_Blob: | |
needs: Code_Signing | |
name: Deploy Worker to Azure Blob Storage | |
if: ${{ github.event_name != 'pull_request' }} | |
strategy: | |
matrix: | |
target: [ Windows_x64_x86, Windows_ARM, macOS, Linux_ARM, Linux_ARM64, Linux_Musl_x64, Linux_Musl_ARM_x64 ] | |
uses: isaacrlevin/presencelight/.github/workflows/Azure_Blob_Deploy.yml@main | |
with: | |
target: ${{ matrix.target }} | |
secrets: inherit | |
Deploy_Containers: | |
name: Deploy Web Containers (DockerHub / GitHub Packages) | |
needs: Build_Web | |
if: ${{ github.event_name != 'pull_request' }} | |
environment: | |
name: Deploy_Containers | |
url: ${{ steps.deploy_staging.outputs.webapp-url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download PreBuild | |
uses: actions/download-artifact@v4 | |
with: | |
name: PreBuild | |
path: ./src | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: BuildArtifacts | |
path: ./BuildArtifacts | |
- name: Get Version from Artifact | |
run: | | |
version=$(<"./BuildArtifacts/version.txt") | |
echo "VERSION=$version" >> $GITHUB_ENV | |
- name: Update Docker Files | |
run: | | |
$dockerFileLatest = Get-Content -path "./src/PresenceLight.Web/Dockerfile" -Raw | |
$dockerFileLatest = $dockerFileLatest -replace '{VERSION}', "${{ env.VERSION }} " | |
$dockerFileLatest | Set-Content -Path "./src/PresenceLight.Web/Dockerfile" | |
$dockerFile32 = Get-Content -path "./src/PresenceLight.Web/Dockerfile.debian-arm32" -Raw | |
$dockerFile32 = $dockerFile32 -replace '{VERSION}', "${{ env.VERSION }} " | |
$dockerFile32 | Set-Content -Path "./src/PresenceLight.Web/Dockerfile.debian-arm32" | |
$dockerFile64 = Get-Content -path "./src/PresenceLight.Web/Dockerfile.debian-arm64" -Raw | |
$dockerFile64 = $dockerFile64 -replace '{VERSION}', "${{ env.VERSION }} " | |
$dockerFile64 | Set-Content -Path "./src/PresenceLight.Web/Dockerfile.debian-arm64" | |
shell: pwsh | |
if: ${{ success() && github.event_name != 'pull_request' }} | |
- name: Push latest Container tag to GitHub Registry | |
uses: opspresso/action-docker@master | |
with: | |
args: --docker | |
env: | |
USERNAME: isaacrlevin | |
REGISTRY: "ghcr.io" | |
PASSWORD: ${{ secrets.GH_PERSONAL_TOKEN }} | |
DOCKERFILE: "./src/PresenceLight.Web/Dockerfile" | |
IMAGE_NAME: "isaacrlevin/presencelight" | |
TAG_NAME: "${{ env.VERSION }}" | |
LATEST: "true" | |
BUILD_PATH: "./src/" | |
- name: Push ARM Container tag to GitHub Registry | |
uses: opspresso/action-docker@master | |
with: | |
args: --docker | |
env: | |
USERNAME: isaacrlevin | |
REGISTRY: "ghcr.io" | |
PASSWORD: ${{ secrets.GH_PERSONAL_TOKEN }} | |
DOCKERFILE: "./src/PresenceLight.Web/Dockerfile.debian-arm32" | |
IMAGE_NAME: "isaacrlevin/presencelight" | |
TAG_NAME: "debian-arm32" | |
BUILD_PATH: "./src/" | |
- name: Push ARM64 tag to GitHub Registry | |
uses: opspresso/action-docker@master | |
with: | |
args: --docker | |
env: | |
USERNAME: isaacrlevin | |
REGISTRY: "ghcr.io" | |
PASSWORD: ${{ secrets.GH_PERSONAL_TOKEN }} | |
DOCKERFILE: "./src/PresenceLight.Web/Dockerfile.debian-arm64" | |
IMAGE_NAME: "isaacrlevin/presencelight" | |
TAG_NAME: "debian-arm64" | |
BUILD_PATH: "./src/" | |
- name: Push ARM tagto DockerHub (Versioned) | |
uses: opspresso/action-docker@master | |
with: | |
args: --docker | |
env: | |
USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
DOCKERFILE: "./src/PresenceLight.Web/Dockerfile.debian-arm32" | |
IMAGE_NAME: "isaaclevin/presencelight" | |
TAG_NAME: "${{ env.VERSION }}-debian-arm32" | |
BUILD_PATH: "./src/" | |
- name: Push ARM tag to DockerHub (Latest) | |
uses: opspresso/action-docker@master | |
with: | |
args: --docker | |
env: | |
USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
DOCKERFILE: "./src/PresenceLight.Web/Dockerfile.debian-arm32" | |
IMAGE_NAME: "isaaclevin/presencelight" | |
TAG_NAME: "debian-arm32" | |
BUILD_PATH: "./src/" | |
- name: Push ARM64 tag to DockerHub (Versioned) | |
uses: opspresso/action-docker@master | |
with: | |
args: --docker | |
env: | |
USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
DOCKERFILE: "./src/PresenceLight.Web/Dockerfile.debian-arm64" | |
IMAGE_NAME: "isaaclevin/presencelight" | |
TAG_NAME: "${{ env.VERSION }}-debian-arm64" | |
BUILD_PATH: "./src/" | |
- name: Push ARM64 tag to DockerHub (Latest) | |
uses: opspresso/action-docker@master | |
with: | |
args: --docker | |
env: | |
USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
DOCKERFILE: "./src/PresenceLight.Web/Dockerfile.debian-arm64" | |
IMAGE_NAME: "isaaclevin/presencelight" | |
TAG_NAME: "debian-arm64" | |
BUILD_PATH: "./src/" | |
- name: Push latest tag to DockerHub | |
uses: opspresso/action-docker@master | |
with: | |
args: --docker | |
env: | |
USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
DOCKERFILE: "./src/PresenceLight.Web/Dockerfile" | |
IMAGE_NAME: "isaaclevin/presencelight" | |
TAG_NAME: "${{ env.VERSION }}" | |
LATEST: "true" | |
BUILD_PATH: "./src/" | |
Deploy_GitHub_Release: | |
name: Deploy Web to GitHub Release | |
needs: Deploy_Azure_Blob | |
if: ${{ github.event_name != 'pull_request' }} | |
environment: | |
name: Deploy_GitHub_Release | |
url: ${{ steps.deploy_staging.outputs.webapp-url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Generate Changelog | |
id: changelog | |
uses: jaywcjlove/changelog-generator@main | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
filter: '' | |
env: | |
commitMode: true | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download Windows_x64_x86 Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: Windows_x64_x86 | |
path: ./Sign/Windows_x64_x86 | |
- name: Download Windows_ARM Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: Windows_ARM | |
path: ./Sign/Windows_ARM | |
- name: Download macOS Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: macOS | |
path: ./Sign/macOS | |
- name: Download Linux_ARM Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: Linux_ARM | |
path: ./Sign/Linux_ARM | |
- name: Download Linux_ARM64 Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: Linux_ARM64 | |
path: ./Sign/Linux_ARM64 | |
- name: Download Linux_Musl_x64 Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: Linux_Musl_x64 | |
path: ./Sign/Linux_Musl_x64 | |
- name: Download Linux_Musl_ARM_x64 Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: Linux_Musl_ARM_x64 | |
path: ./Sign/Linux_Musl_ARM_x64 | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: BuildArtifacts | |
path: "./BuildArtifacts" | |
- name: Get Version from Artifact | |
run: | | |
version=$(<"./BuildArtifacts/version.txt") | |
echo "VERSION=$version" >> $GITHUB_ENV | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: "Web-v${{ env.VERSION }}" | |
body: ${{ steps.changelog.outputs.changelog }} | |
fail_on_unmatched_files: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
./Sign/**/*.zip | |
- name: Setup Tmate session | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 15 |