Skip to content

setup github actions for dotnet https://github.com/OWASP/wrongsecrets… #3

setup github actions for dotnet https://github.com/OWASP/wrongsecrets…

setup github actions for dotnet https://github.com/OWASP/wrongsecrets… #3

Workflow file for this run

name: dotnet package
on:
workflow_dispatch:
push:
paths:
- 'dotnet/**'
- '.github/**'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
runtime: [ 'osx-x64','osx-arm64','win-x64','win-arm64','linux-x64','linux-arm64','linux-musl-x64','linux-musl-arm64']
steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Build and Package ${{ matrix.runtime }}
run: |
mkdir target
cd dotnet/dotnetproject
dotnet build dotnetproject.csproj --runtime ${{ matrix.runtime }} --self-contained true
dotnet publish dotnetproject.csproj --runtime ${{ matrix.runtime }} /p:PublishSingleFile=true
cp ./bin/Release/net8.0/${{ matrix.runtime }}/publish/dotnetproject ../../target/wrongsecrets-dotnet-${{ matrix.runtime }}
- name: Uploading executables
uses: actions/upload-artifact@v4
with:
name: executable-dotnet-${{ matrix.runtime }}
path: target/*