change ci yaml file for ex 5 v3
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
name: First CI
|
name: First CI
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
@@ -7,15 +8,19 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rid: ["win-x64", "linux-x64"]
|
rid: ["win-x64", "linux-x64"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
- uses: actions/setup-dotnet@v3
|
- uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
- run: dotnet restore
|
- run: dotnet restore
|
||||||
- run: dotnet publish -o app -r ${{ matrix.rid }} --sc /p:PublishSingleFile=true
|
- run: dotnet build --configuration Release
|
||||||
- run: tar cf app.tar app/
|
- run: dotnet publish -c Release -o app-${{ matrix.rid }} -r ${{ matrix.rid }} /p:PublishSingleFile=true --self-contained true
|
||||||
|
- if: runner.os == 'Linux'
|
||||||
|
run: chmod -R +x app-${{ matrix.rid }} || true
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: app.tar
|
name: app-${{ matrix.rid }}
|
||||||
path: app.tar
|
path: app-${{ matrix.rid }}
|
||||||
|
|||||||
Reference in New Issue
Block a user