Files
lab7-ci/.gitea/workflows/ci.yml
Dana123098 c67d4b9ef2
All checks were successful
First CI / build (linux-x64) (push) Successful in 1m47s
First CI / build (win-x64) (push) Successful in 1m49s
Use matrix to build app for win-x64 and linux-x64 with artifacts
2025-11-20 12:40:36 +01:00

33 lines
829 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
- run: dotnet build
- run: dotnet test
- name: publish app for ${{ matrix.rid }}
run: dotnet publish -o app-${{ matrix.rid }} -r ${{ matrix.rid }} --sc /p:PublishSingleFile=true,AssemblyName=app
- name: pack app-${{ matrix.rid }} to tar
run: tar cf app-${{ matrix.rid }}.tar app-${{ matrix.rid }}/
- name: upload artifact for ${{ matrix.rid }}
uses: actions/upload-artifact@v3
with:
name: app-${{ matrix.rid }}.tar
path: app-${{ matrix.rid }}.tar