Build installers #13
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
name: Build installers | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
create-zip: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v1 | |
- name: Install WiX Toolset 3.14 | |
run: choco install wixtoolset --version 3.14.0 | |
continue-on-error: true | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build Release | |
run: dotnet build --no-restore --configuration Release | |
- name: Build MSI Installer | |
run: msbuild Scripture.Installer/Scripture.Installer.wixproj /p:Configuration=Release | |
- name: Build Bundle Installer | |
run: msbuild Scripture.Installer.Bundle/Scripture.Installer.Bundle.wixproj /p:Configuration=Release | |
- name: Set timestamp | |
id: set_timestamp | |
run: | | |
$timestamp = Get-Date -Format "yy-MM-dd-HH-mm" | |
echo "timestamp=$timestamp" | Out-File -FilePath $env:GITHUB_ENV -Append | |
shell: pwsh | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: "v${{ env.timestamp }}" | |
release_name: "Release ${{ env.timestamp }}" | |
draft: false | |
prerelease: false | |
- name: Upload MSI Artifact to Release | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: "Scripture.Installer/bin/x64/Release/ScriptureAutocadPlugin.msi" | |
asset_name: "ScriptureAutocadPlugin-${{ env.timestamp }}.msi" | |
label: "MSI Installer" | |
- name: Upload EXE Artifact to Release | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: "Scripture.Installer.Bundle/bin/x64/Release/ScriptureInstaller.exe" | |
asset_name: "ScriptureBundleInstaller-${{ env.timestamp }}.exe" | |
label: "Bundle Installer" |