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: actions/checkout@v2
- uses: xmake-io/github-action-setup-xmake@v1 - uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: "2.9.3"
- run: | - run: |
xmake repo -u xmake repo -u
@@ -23,14 +21,8 @@ jobs:
- run: | - run: |
xmake -w -y xmake -w -y
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
with: with:
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }} name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
path: | path: |
bin/DLL/ bin/
- uses: actions/upload-artifact@v3
with:
name: PDB
path: |
bin/PDB/
+8 -25
View File
@@ -11,8 +11,6 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- uses: xmake-io/github-action-setup-xmake@v1 - uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: "2.9.3"
- run: | - run: |
xmake repo -u xmake repo -u
@@ -23,17 +21,11 @@ jobs:
- run: | - run: |
xmake -w -y xmake -w -y
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
with: with:
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }} name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
path: | path: |
bin/DLL/ bin/
- uses: actions/upload-artifact@v3
with:
name: PDB
path: |
bin/PDB/
upload-to-release: upload-to-release:
needs: needs:
@@ -45,32 +37,23 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download Plugin - name: Download Mod
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
with: with:
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }} name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
path: release/Plugin/ path: artifact
- name: Download PDB
uses: actions/download-artifact@v3
with:
name: PDB
path: release/PDB/
- name: Copy additional files - name: Copy additional files
run: | run: |
cp LICENSE README.md release/Plugin/ cp -v LICENSE README.md artifact/
- name: Archive release - name: Archive release
run: | run: |
cd release/Plugin
zip -r ../${{ github.event.repository.name }}-windows-x64.zip * zip -r ../${{ github.event.repository.name }}-windows-x64.zip *
cd .. working-directory: artifact
- name: Create GitHub Release - name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
files: | files: |
release/${{ github.event.repository.name }}-windows-x64.zip ${{ github.event.repository.name }}-windows-x64.zip
release/PDB/${{ github.event.repository.name }}.pdb