30 lines
657 B
YAML
30 lines
657 B
YAML
name: First CI
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
rid: ["win-x64", "linux-x64"]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: '6.0.x'
|
|
|
|
- name: Restore dependencies
|
|
run: dotnet restore
|
|
|
|
- name: Publish application
|
|
run: dotnet publish -o app -r ${{ matrix.rid }} --sc /p:PublishSingleFile=true
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ matrix.rid }}-artifacts
|
|
path: app
|