name: Build OutlookAddin on: push: branches: [main] tags: ['v*'] pull_request: branches: [main] jobs: build: runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Restore NuGet run: nuget restore OutlookAddin.sln - name: Build run: msbuild OutlookAddin.sln /t:Build /p:Configuration=Release /p:Platform="Any CPU" /m - name: Test run: dotnet test src/OutlookAddin.Tests/OutlookAddin.Tests.csproj --configuration Release --no-build --logger "trx;LogFileName=test-results.trx" - name: Upload test results if: always() uses: actions/upload-artifact@v4 with: name: test-results path: '**/*.trx' publish: needs: build if: startsWith(github.ref, 'refs/tags/v') runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Restore NuGet run: nuget restore OutlookAddin.sln - name: Build Release run: msbuild OutlookAddin.sln /t:Build /p:Configuration=Release /p:Platform="Any CPU" /m # Code signing — cert installed on the runner's CurrentUser\My store. # Thumbprint comes from a Gitea Actions secret CODESIGN_THUMBPRINT. - name: Sign assemblies run: | $thumb = "${{ secrets.CODESIGN_THUMBPRINT }}" signtool sign /sha1 $thumb /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 ` src/OutlookAddin/bin/Release/MarcusLaw.OutlookAddin.dll ` src/OutlookAddin.Core/bin/Release/net48/MarcusLaw.OutlookAddin.Core.dll ` src/OutlookAddin.UI/bin/Release/net48/MarcusLaw.OutlookAddin.UI.dll # mage.exe creates the ClickOnce .application + .vsto manifests. # See docs/ARCHITECTURE.md → Deployment for the full command sequence. - name: Publish ClickOnce run: | # TODO: invoke mage.exe / `vsto-publish` script (placeholder) echo "ClickOnce publish — to be implemented in week 6" - name: Upload to platform.dev env: SSH_KEY: ${{ secrets.PLATFORM_DEV_SSH_KEY }} run: | # TODO: rsync publish/ to platform.dev.marcus-law.co.il:/var/www/outlook-addin/ echo "rsync — to be implemented in week 6" - name: Notify Mattermost if: success() run: | # TODO: POST to MATTERMOST_WEBHOOK_RELEASES (from Infisical /mattermost) echo "Mattermost notification — to be implemented in week 6"