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