From 2bd924d97d9edc8e25691b940bb7b3f9821889fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ForDream=E4=B8=B6=E6=A2=A6=E7=A9=BA?= <56014859+Forgot-Dream@users.noreply.github.com> Date: Fri, 8 Dec 2023 09:46:55 +0800 Subject: [PATCH 1/3] ci: create CI/CD to build app --- .github/workflows/build_latest.yml | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build_latest.yml diff --git a/.github/workflows/build_latest.yml b/.github/workflows/build_latest.yml new file mode 100644 index 0000000..95c4179 --- /dev/null +++ b/.github/workflows/build_latest.yml @@ -0,0 +1,37 @@ +name: Build Latest + +on: [push,workflow_dispatch] + +env: + DOTNET_SDK_VERSION: '8.0.*' + PROJECT_NAME: 'STS-Bcut' + +jobs: + + build-win-x64-arm64: + + runs-on: windows-latest + + steps: + + - uses: actions/checkout@v1 + + - name: Set up dotnet + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ env.DOTNET_SDK_VERSION }} + + - run: dotnet publish ${{ env.PROJECT_NAME }} -r win-x64 -c Release -o artifact-x64 -p:PublishTrimmed=true -p:PublishSingleFile=true -p:PublishReadyToRun=true --self-contained true + - run: dotnet publish ${{ env.PROJECT_NAME }} -r win-arm64 -c Release -o artifact-arm64 -p:PublishTrimmed=true -p:PublishSingleFile=true -p:PublishReadyToRun=true --self-contained true + + - name: Upload Artifact[win-x64] + uses: actions/upload-artifact@v3.1.3 + with: + name: ${{ env.PROJECT_NAME }}_win-x64 + path: artifact-x64\${{ env.PROJECT_NAME }}.exe + + - name: Upload Artifact[win-arm64] + uses: actions/upload-artifact@v3.1.3 + with: + name: ${{ env.PROJECT_NAME }}_win-arm64 + path: artifact-arm64\${{ env.PROJECT_NAME }}.exe From 3a16bf1f2b9aa7363452df8e1ddef64cedc19c7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ForDream=E4=B8=B6=E6=A2=A6=E7=A9=BA?= <56014859+Forgot-Dream@users.noreply.github.com> Date: Fri, 8 Dec 2023 09:49:44 +0800 Subject: [PATCH 2/3] ci: fix --- .github/workflows/build_latest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_latest.yml b/.github/workflows/build_latest.yml index 95c4179..49b804c 100644 --- a/.github/workflows/build_latest.yml +++ b/.github/workflows/build_latest.yml @@ -21,8 +21,8 @@ jobs: with: dotnet-version: ${{ env.DOTNET_SDK_VERSION }} - - run: dotnet publish ${{ env.PROJECT_NAME }} -r win-x64 -c Release -o artifact-x64 -p:PublishTrimmed=true -p:PublishSingleFile=true -p:PublishReadyToRun=true --self-contained true - - run: dotnet publish ${{ env.PROJECT_NAME }} -r win-arm64 -c Release -o artifact-arm64 -p:PublishTrimmed=true -p:PublishSingleFile=true -p:PublishReadyToRun=true --self-contained true + - run: dotnet publish ${{ env.PROJECT_NAME }}.sln -r win-x64 -c Release -o artifact-x64 -p:PublishTrimmed=true -p:PublishSingleFile=true -p:PublishReadyToRun=true --self-contained true + - run: dotnet publish ${{ env.PROJECT_NAME }}.sln -r win-arm64 -c Release -o artifact-arm64 -p:PublishTrimmed=true -p:PublishSingleFile=true -p:PublishReadyToRun=true --self-contained true - name: Upload Artifact[win-x64] uses: actions/upload-artifact@v3.1.3 From c32f1a7677c87925e178fa397fe7afd391ac3e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ForDream=E4=B8=B6=E6=A2=A6=E7=A9=BA?= <56014859+Forgot-Dream@users.noreply.github.com> Date: Tue, 12 Dec 2023 10:34:27 +0800 Subject: [PATCH 3/3] ci: Update build_latest.yml --- .github/workflows/build_latest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_latest.yml b/.github/workflows/build_latest.yml index 49b804c..69cd834 100644 --- a/.github/workflows/build_latest.yml +++ b/.github/workflows/build_latest.yml @@ -21,8 +21,8 @@ jobs: with: dotnet-version: ${{ env.DOTNET_SDK_VERSION }} - - run: dotnet publish ${{ env.PROJECT_NAME }}.sln -r win-x64 -c Release -o artifact-x64 -p:PublishTrimmed=true -p:PublishSingleFile=true -p:PublishReadyToRun=true --self-contained true - - run: dotnet publish ${{ env.PROJECT_NAME }}.sln -r win-arm64 -c Release -o artifact-arm64 -p:PublishTrimmed=true -p:PublishSingleFile=true -p:PublishReadyToRun=true --self-contained true + - run: dotnet publish ${{ env.PROJECT_NAME }}.sln -r win-x64 -c Release -o artifact-x64 -p:PublishSingleFile=true -p:PublishReadyToRun=true --self-contained true + - run: dotnet publish ${{ env.PROJECT_NAME }}.sln -r win-arm64 -c Release -o artifact-arm64 -p:PublishSingleFile=true -p:PublishReadyToRun=true --self-contained true - name: Upload Artifact[win-x64] uses: actions/upload-artifact@v3.1.3