prepare for v1.0 release #26
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: Solid - Build, Test, Installer, Release | |
on: | |
push: | |
jobs: | |
build-and-test: | |
name: Build Debug and Run Tests | |
# note that the older .Net 4.6.1 isn't installed on windows-latest anymore | |
# see https://github.com/actions/runner-images/issues/5055 | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Cache NuGet packages | |
id: cache-nuget | |
uses: actions/cache@v3 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Restore | |
run: dotnet restore src/solid.sln | |
- name: Build | |
run: dotnet build src/solid.sln --no-restore | |
- name: Run NUnit Tests | |
run: dotnet test output/net461/*Tests.dll --filter "TestCategory != SkipOnCI" --no-build -- NUnit.TestOutputXml=TestResults | |
build-installer: | |
name: Build Release And Make Installer | |
needs: build-and-test | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: microsoft/setup-msbuild@v2 | |
# nuget and TC dependencies come from the cache | |
- uses: actions/cache@v4 | |
with: | |
path: src\packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('src/SolidGui/packages.config') }} # hash of one packages.config (there are others) | |
- uses: actions/cache@v4 | |
with: | |
path: lib | |
key: ${{ runner.os }}-teamcity-${{ hashFiles('build/getDependencies-windows.sh') }} | |
- name: Build Solid for Release | |
run: msbuild /p:Configuration=Release src/solid.sln | |
- name: Build Installer | |
run: iscc installer/setup.iss | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: SolidInstaller.exe | |
path: installer\Output\SolidInstaller.exe | |
if-no-files-found: error | |
sign-installer: | |
name: Sign SOLID installer | |
needs: build-installer | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: sillsdev/codesign/.github/workflows/sign.yml@v2 | |
with: | |
artifact: SolidInstaller.exe | |
secrets: | |
certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} | |
create-release: | |
name: Create Release | |
needs: sign-installer | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: windows-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: SolidInstaller.exe | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: SolidInstaller.exe | |
body: | | |
Release for version ${{ github.ref }} | |
draft: true |