Skip to content

Commit

Permalink
chore: edit action
Browse files Browse the repository at this point in the history
  • Loading branch information
joisun committed Sep 25, 2024
1 parent c73b89e commit da09c4a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,19 @@ jobs:

- name: Build and zip extensions
run: |
pnpm zip
pnpm zip:firefox
ls .output # 列出 .output 目录
pnpm zip # 生成 Chrome ZIP
pnpm zip:firefox # 生成 Firefox ZIP
echo '------------------------output------------------------'
ls .output # 列出 .output 目录,以确认文件生成情况
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: 'Findjob-bot v${{ github.ref_name }}'
tag_name: ${{ github.ref_name }} # 使用标签名称
release_name: 'Findjob-bot ${{ github.ref_name }}' # 统一使用标签名称
draft: false
prerelease: false

Expand All @@ -52,8 +53,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .output/Findjob-bot-v${{ github.ref_name }}-chrome.zip
asset_name: Findjob-bot-v${{ github.ref_name }}-chrome.zip
asset_path: .output/findjob-bot-${{ github.ref_name }}-chrome.zip # 根据标签动态生成文件名
asset_name: findjob-bot-${{ github.ref_name }}-chrome.zip
asset_content_type: application/zip

- name: Upload Firefox Release Asset
Expand All @@ -62,6 +63,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .output/Findjob-bot-v${{ github.ref_name }}-firefox.zip
asset_name: Findjob-bot-v${{ github.ref_name }}-firefox.zip
asset_path: .output/findjob-bot-${{ github.ref_name }}-firefox.zip # 根据标签动态生成文件名
asset_name: findjob-bot-${{ github.ref_name }}-firefox.zip
asset_content_type: application/zip

0 comments on commit da09c4a

Please sign in to comment.