fix: update artifact naming to remove SHA from zip files for Chrome and Firefox extensions
All checks were successful
构建扩展程序 / 构建 Chrome 扩展程序 (push) Successful in 48s
构建扩展程序 / 构建 Firefox 附加组件 (push) Successful in 46s
构建扩展程序 / 发布至 Chrome 应用商店 (push) Has been skipped

This commit is contained in:
Astrian Zheng 2025-05-29 10:00:31 +10:00
parent a92cf12035
commit c2bd90f432
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA

View File

@ -29,17 +29,17 @@ jobs:
- name: 将构建结果压缩成 ZIP - name: 将构建结果压缩成 ZIP
run: |- run: |-
cd dist cd dist
zip -r ../msrmod-chrome-${{ gitea.sha | slice(0, 8) }}.zip ./* zip -r ../msrmod-chrome.zip ./*
cd .. cd ..
- name: 上传构建工件 - name: 上传构建工件
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: chrome-extension name: chrome-extension
path: msrmod-chrome-${{ gitea.sha | slice(0, 8) }}.zip path: msrmod-chrome.zip
build-for-firefox: build-for-firefox:
name: 构建 Firefox 扩展程序 name: 构建 Firefox 附加组件
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -60,14 +60,14 @@ jobs:
- name: 将构建结果压缩成 ZIP - name: 将构建结果压缩成 ZIP
run: |- run: |-
cd dist cd dist
zip -r ../msrmod-firefox-${{ gitea.sha | slice(0, 8) }}.zip ./* zip -r ../msrmod-firefox.zip ./*
cd .. cd ..
- name: 上传构建工件 - name: 上传构建工件
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: firefox-addon name: firefox-addon
path: msrmod-firefox-${{ gitea.sha | slice(0, 8) }}.zip path: msrmod-firefox.zip
publish: publish:
name: 发布至 Chrome 应用商店 name: 发布至 Chrome 应用商店
@ -95,7 +95,7 @@ jobs:
- name: 上传扩展程序到 Chrome Web Store - name: 上传扩展程序到 Chrome Web Store
run: |- run: |-
chrome-webstore-upload upload \ chrome-webstore-upload upload \
--source msrmod-chrome-${{ gitea.sha | slice(0, 8) }}.zip \ --source msrmod-chrome.zip \
--extension-id kphoaomopljjiofeaigjmbagmbdaamhh \ --extension-id kphoaomopljjiofeaigjmbagmbdaamhh \
--client-id ${{ secrets.CI_GOOGLE_CLIENT_ID }} \ --client-id ${{ secrets.CI_GOOGLE_CLIENT_ID }} \
--client-secret ${{ secrets.CI_GOOGLE_CLIENT_SECRET }} \ --client-secret ${{ secrets.CI_GOOGLE_CLIENT_SECRET }} \