Skip to content

Hardening the CI in relation to PRs #40

Hardening the CI in relation to PRs

Hardening the CI in relation to PRs #40

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: MSBuild
on:
push:
branches:
- '*'
tags:
- '*'
pull_request_target:
types: [labeled]
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .\winfsp-uninstaller.sln
BUILD_CONFIG: Debug
steps:
- uses: actions/checkout@v3
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
with:
msbuild-architecture: x64
- name: If tagged, use release config
if: startsWith(github.ref, 'refs/tags/')
run: echo "BUILD_CONFIG=Release" >> "$GITHUB_ENV"
shell: bash
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIG}} /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}}
- name: Codesign on release builds
if: startsWith(github.ref, 'refs/tags/')
uses: skymatic/code-sign-action@v2
with:
certificate: ${{ secrets.WIN_CODESIGN_P12_BASE64 }}
password: ${{ secrets.WIN_CODESIGN_P12_PW }}
certificatesha1: 5FC94CE149E5B511E621F53A060AC67CBD446B3A
description: Cryptomators WinFsp Uninstaller
timestampUrl: 'http://timestamp.digicert.com'
folder: x64\${{env.BUILD_CONFIG}}
- name: Upload build dir
uses: actions/upload-artifact@v3
with:
name: winfsp-uninstaller
path: .\x64\${{env.BUILD_CONFIG}}\winfsp-uninstaller.exe
if-no-files-found: error