From f753b7c6204b9a32f65e3f6672467ac20dad23ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E6=B2=90=E5=91=80?= <163636894+zimuya4153@users.noreply.github.com> Date: Mon, 16 Dec 2024 17:45:27 +0800 Subject: [PATCH] refactor: update GitHub actions and simplify artifact handling --- .github/workflows/build.yml | 12 ++---------- .github/workflows/release.yml | 33 ++++++++------------------------- 2 files changed, 10 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6419abe..3c6d683 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,8 +11,6 @@ jobs: uses: actions/checkout@v2 - uses: xmake-io/github-action-setup-xmake@v1 - with: - xmake-version: "2.9.3" - run: | xmake repo -u @@ -23,14 +21,8 @@ jobs: - run: | xmake -w -y - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }} path: | - bin/DLL/ - - - uses: actions/upload-artifact@v3 - with: - name: PDB - path: | - bin/PDB/ + bin/ \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d069c1d..852fe38 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,8 +11,6 @@ jobs: uses: actions/checkout@v2 - uses: xmake-io/github-action-setup-xmake@v1 - with: - xmake-version: "2.9.3" - run: | xmake repo -u @@ -23,17 +21,11 @@ jobs: - run: | xmake -w -y - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }} path: | - bin/DLL/ - - - uses: actions/upload-artifact@v3 - with: - name: PDB - path: | - bin/PDB/ + bin/ upload-to-release: needs: @@ -45,32 +37,23 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Download Plugin - uses: actions/download-artifact@v3 + - name: Download Mod + uses: actions/download-artifact@v4 with: name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }} - path: release/Plugin/ - - - name: Download PDB - uses: actions/download-artifact@v3 - with: - name: PDB - path: release/PDB/ + path: artifact - name: Copy additional files run: | - cp LICENSE README.md release/Plugin/ + cp -v LICENSE README.md artifact/ - name: Archive release run: | - cd release/Plugin zip -r ../${{ github.event.repository.name }}-windows-x64.zip * - cd .. + working-directory: artifact - name: Create GitHub Release - id: create_release uses: softprops/action-gh-release@v1 with: files: | - release/${{ github.event.repository.name }}-windows-x64.zip - release/PDB/${{ github.event.repository.name }}.pdb + ${{ github.event.repository.name }}-windows-x64.zip \ No newline at end of file