last commit
This commit is contained in:
parent
408f0a04b9
commit
47c35f15eb
@ -1,49 +1,16 @@
|
|||||||
name: First CI
|
name: First CI
|
||||||
on:
|
on: [push]
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
rid: ["win-x64", "linux-x64"]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
- uses: actions/setup-dotnet@v3
|
||||||
|
|
||||||
- name: Setup .NET
|
|
||||||
uses: actions/setup-dotnet@v3
|
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
- run: dotnet restore
|
||||||
- name: Restore dependencies
|
- run: dotnet publish -o app -r ${{ matrix.rid }} --sc /p:PublishSingleFile=true
|
||||||
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: 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