28 lines
727 B
YAML
28 lines
727 B
YAML
name: First CI
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
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
|
|
- run: dotnet publish -o app -r linux-x64 --sc /p:PublishSingleFile=true,AssemblyName=app
|
|
- run: |
|
|
mkdir -p artifacts
|
|
tar cf artifacts/app.tar app/
|
|
outputs:
|
|
artifact_path: artifacts/app.tar
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: cp "${{ needs.build.outputs.artifact_path }}" ./app.tar
|
|
- run: tar xf app.tar
|
|
- run: ./app/app |