refactor: update GitHub actions and simplify artifact handling

This commit is contained in:
子沐呀
2024-12-16 17:45:27 +08:00
Unverified
parent 4494e7986c
commit f753b7c620
2 changed files with 10 additions and 35 deletions
+2 -10
View File
@@ -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/
+8 -25
View File
@@ -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