Skip to content

Commit

Permalink
Update dotnet.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lemccomb committed Aug 7, 2023
1 parent 6a4f743 commit ebf4698
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "*" ]
release:
#workflow_call:
# Use "Inputs" and "Secrets" to pass values from caller if needed
# You can then use the ${{ inputs.variable-name }} and ${{ secrets.envPAT }} syntax to access them
# See https://docs.github.com/en/actions/using-workflows/reusing-workflows for more info

jobs:
build:
name: build-${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macOS-latest] # macOS-latest and ubuntu-latest are broken at the moment. Add it back in when fixed.
os: [windows-latest, ubuntu-latest, macOS-latest]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -44,23 +49,31 @@ jobs:
# Eventually we might want to tweak the CodeQL job to run on what we already built above so it isn't using resources to autobuild.

- name: Publish debug
#if: ${{ github.event_name == 'push' }}
#if: ${{ github.event_name != 'pull_request' }}
# Publish all of the non-test projects to published/release. We have to use the solution file to get the right output paths.
run: dotnet publish --no-build --configuration Debug --output published/debug CoseSignTool/CoseSignTool.sln

- name: Publish release
#if: ${{ github.event_name == 'push' }}
#if: ${{ github.event_name != 'pull_request' }}
# Publish CoseSignTool.exe and it's dependencies (all of the non-test projects) to published/release.
run: dotnet publish --configuration Release --output published/release CoseSignTool/CoseSignTool/CoseSignTool.csproj

- name: List published directory Windows
if: ${{ github.event_name == 'push' && runner.os == 'Windows' }}
if: ${{ github.event_name != 'pull_request' && runner.os == 'Windows' }}
run: dir /b /a /s
shell: cmd
working-directory: ./published

- name: List published directory non-Windows
if: ${{ github.event_name == 'push' && runner.os != 'Windows' }}
if: ${{ github.event_name != 'pull_request' && runner.os != 'Windows' }}
run: ls -a -R
shell: bash
working-directory: ./published

- name: Upload the artifacts
#if: ${{ github.event_name == 'release' }}
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'example-*'

0 comments on commit ebf4698

Please sign in to comment.