artefacts
Some checks are pending
First CI / test (push) Waiting to run
First CI / build (push) Successful in 1m43s

This commit is contained in:
Dawid Rutkowski 2024-11-25 10:54:53 +01:00
parent 1a7c22777f
commit 408f0a04b9

View File

@ -1,17 +1,49 @@
name: First CI name: First CI
on: [push] on:
push:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - name: Checkout repository
- uses: actions/setup-dotnet@v3 uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with: with:
dotnet-version: '8.0.x' dotnet-version: '8.0.x'
- run: dotnet restore
- run: dotnet build - name: Restore dependencies
run: dotnet restore
- name: Build the project
run: dotnet build
- name: Run tests
run: dotnet test
- name: Publish application
run: dotnet publish -o app -r linux-x64 --sc /p:PublishSingleFile=true /p:AssemblyName=app
- name: Create tarball
run: tar cf app.tar app/
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: app.tar
path: app.tar
test: test:
steps: steps:
- name: trying to run - name: Download artifact
run: dotnet run uses: actions/download-artifact@v3
with:
name: app.tar
- name: Extract tarball
run: tar xf app.tar
- name: Run the application
run: ./app/app