Skip to content

Merge pull request #130 from mortenn/feature/29 #21

Merge pull request #130 from mortenn/feature/29

Merge pull request #130 from mortenn/feature/29 #21

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Determine version
id: version
uses: paulhatch/semantic-version@v5.4.0
with:
version_format: "${major}.${minor}.${patch}"
- name: Upload certificate
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/code_signing.cer
outputs:
version: ${{ steps.version.outputs.version}}
dependent:
runs-on: windows-latest
needs: prepare
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build runtime dependent binaries
uses: "./.github/template/build-signed"
with:
base64_encoded_pfx: ${{ secrets.Base64_Encoded_Pfx }}
pfx_key: ${{ secrets.Pfx_Key }}
dotnet_args: "-p VersionPrefix=${{ needs.prepare.outputs.version }}"
package_project: dist/Dependent/Dependent.wixproj
package_version: ${{ needs.prepare.outputs.version }}
package: dist\Dependent\bin\Release\BrowserPicker.msi
package_name: DependentSetup-${{ needs.prepare.outputs.version }}-Release
package_path: dist/Dependent/bin/Release
binaries: |
src\BrowserPicker.App\bin\Release\net8.0-windows\publish\BrowserPicker*.dll src\BrowserPicker.App\bin\Release\net8.0-windows\publish\BrowserPicker*.exe
bundle_name: Dependent-${{ needs.prepare.outputs.version }}-Release
bundle_path: src/BrowserPicker.App/bin/Release/net8.0-windows/publish
portable:
runs-on: windows-latest
needs: prepare
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build runtime independent binaries
uses: "./.github/template/build-signed"
with:
base64_encoded_pfx: ${{ secrets.Base64_Encoded_Pfx }}
pfx_key: ${{ secrets.Pfx_Key }}
dotnet_args: "-p VersionPrefix=${{ needs.prepare.outputs.version }} -r win-x64 -p:PublishSingleFile=true"
package_project: dist/Portable/Portable.wixproj
package_version: ${{ needs.prepare.outputs.version }}
package: dist\Portable\bin\Release\BrowserPicker-Portable.msi
package_name: PortableSetup-${{ needs.prepare.outputs.version }}-Release
package_path: dist/Portable/bin/Release
binaries: src\BrowserPicker.App\bin\Release\net8.0-windows\win-x64\publish\BrowserPicker.exe
bundle_name: Portable-${{ needs.prepare.outputs.version }}-Release
bundle_path: src/BrowserPicker.App/bin/Release/net8.0-windows/win-x64/publish
publish:
runs-on: ubuntu-latest
needs: [prepare, dependent, portable]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Retrieve artifacts
uses: actions/download-artifact@v4
- name: Package bundles
run: |
rm -rf *.zip
for bundle in Dependent Portable; do
zip -jr $bundle.zip $bundle-${{ needs.prepare.outputs.version }}-Release/*
done
- name: Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
draft: true
prerelease: true
files: |
DependentSetup-${{ needs.prepare.outputs.version }}-Release/BrowserPicker.msi
PortableSetup-${{ needs.prepare.outputs.version }}-Release/BrowserPicker-Portable.msi
Dependent.zip
Portable.zip
dist/code_signing.cer