Skip to content

Commit

Permalink
chore(tooling): migrate to github actions (#253)
Browse files Browse the repository at this point in the history
* Test action for building

* set pre-release flag

* try forcing version

* no need for msbuild

* Fix warning during build

* Fixes

* rename

* Add inno build step

* Add incrementing versions

* fix var

* another try

* try as separate flags

* cleanup

* Finish up
  • Loading branch information
mscrivo authored Nov 3, 2024
1 parent 847d52c commit e20cbb5
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 1 deletion.
70 changes: 70 additions & 0 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build and Sign

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
strategy:
matrix:
configuration: [Release]

runs-on: windows-latest

env:
VERSION: '4.3.${{ github.run_number }}'

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'
fetch-depth: 0

- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Build the app
run: dotnet build --configuration $env:Configuration -p:Version=${{ env.VERSION }} -p:FileVersion=${{ env.VERSION }}
env:
Configuration: ${{ matrix.configuration }}

- name: Sign App Files
uses: GabrielAcostaEngler/[email protected]
with:
certificate: '${{ secrets.BASE64_ENCODED_PFX }}'
cert-password: '${{ secrets.PFX_PASSWORD }}'
cert-sha1: '${{ secrets.CERT_HASH_SHA1 }}'
# path to folder containing files to sign.
folder: 'OotD.Launcher\bin\Release\net9.0-windows7.0'
recursive: true
timestamp-server: 'http://timestamp.digicert.com'

- name: Build Installer
uses: Minionguyjpro/[email protected]
with:
path: "Setup Script.iss"
options: /O+

- name: Sign Installer
uses: GabrielAcostaEngler/[email protected]
with:
certificate: '${{ secrets.BASE64_ENCODED_PFX }}'
cert-password: '${{ secrets.PFX_PASSWORD }}'
cert-sha1: '${{ secrets.CERT_HASH_SHA1 }}'
# path to folder containing files to sign.
folder: 'ServerStaging'
recursive: false
timestamp-server: 'http://timestamp.digicert.com'

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: Installer
path: ServerStaging
2 changes: 1 addition & 1 deletion NetSparkle

0 comments on commit e20cbb5

Please sign in to comment.