artefacts
This commit is contained in:
parent
1a7c22777f
commit
408f0a04b9
@ -1,17 +1,49 @@
|
||||
name: First CI
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v3
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
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:
|
||||
steps:
|
||||
- name: trying to run
|
||||
run: dotnet run
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: app.tar
|
||||
|
||||
- name: Extract tarball
|
||||
run: tar xf app.tar
|
||||
|
||||
- name: Run the application
|
||||
run: ./app/app
|
||||
|
Loading…
Reference in New Issue
Block a user