30 lines
753 B
YAML
30 lines
753 B
YAML
name: First CI
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
rid: ["win-x64", "linux-x64"]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: '8.0.x'
|
|
|
|
- run: dotnet restore
|
|
|
|
- name: Publish for ${{ matrix.rid }}
|
|
run: dotnet publish ./Lab7.csproj -c Release -o app-${{ matrix.rid }} -r ${{ matrix.rid }} -p:PublishSingleFile=true -p:AssemblyName=app
|
|
|
|
- name: Archive artifact
|
|
run: tar cf app-${{ matrix.rid }}.tar app-${{ matrix.rid }}/
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: app-${{ matrix.rid }}
|
|
path: app-${{ matrix.rid }}.tar
|