Skip to content

Commit

Permalink
✨ Add Github Actions workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
hexawyz committed Mar 30, 2024
1 parent f88609e commit a09816b
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: .NET Core Desktop

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

jobs:

build:

strategy:
matrix:
configuration: [Release]

runs-on: windows-latest

steps:
- name: Prepare artifact name
run: Add-Content -Path $env:GITHUB_ENV -Value "ARTIFACT_NAME=$(Get-Date -Format yyyy-dd-MM)-$env:GITHUB_SHA"

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild Exo.sln /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

# Decode the base 64 encoded pfx and save the Signing_Certificate
- name: Publish
run: .\Publish.ps1

# Bundle the results of the publish step into a 7z archive.
- name: Bundle
run: 7z a "$env:ARTIFACT_NAME.7z" .\publish\*

# Publish the artifact
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_NAME }}.7z

3 changes: 2 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"sdk": {
"version": "8.0.100"
"version": "8.0.100",
"rollForward": "latestFeature"
}
}

0 comments on commit a09816b

Please sign in to comment.