From 9bbf148047591890fbb148e18b29fe551983f87b Mon Sep 17 00:00:00 2001 From: Lee Date: Thu, 12 Dec 2024 20:33:38 +0800 Subject: [PATCH] test --- .github/workflows/make.yml | 91 ++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 48 deletions(-) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index d9ec0f7..229658d 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -7,14 +7,14 @@ on: workflow_dispatch: env: - VERSION: 1.0.${{ github.run_number }} # 动态版本号,基于当前工作流运行次数 + VERSION: ${{ github.ref_name }} # 动态版本号,基于当前工作流运行次数 jobs: linux: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -30,7 +30,7 @@ jobs: yarn make - name: Upload Linux Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: linux-artifact path: out/make @@ -39,7 +39,7 @@ jobs: runs-on: windows-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -54,7 +54,7 @@ jobs: run: yarn make - name: Upload Windows Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: windows-artifact path: out/make @@ -63,7 +63,7 @@ jobs: runs-on: macos-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -78,7 +78,7 @@ jobs: run: yarn make - name: Upload macOS Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: macos-artifact path: out/make @@ -88,59 +88,54 @@ jobs: runs-on: ubuntu-latest steps: - name: Download Linux Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: linux-artifact path: dist/linux - name: Download Windows Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: windows-artifact path: dist/windows - name: Download macOS Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: macos-artifact path: dist/macos - - name: Create Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: GH Release + uses: softprops/action-gh-release@v2.2.0 with: - tag_name: v${{ env.VERSION }} - release_name: Git Helper v${{ env.VERSION }} - draft: false - prerelease: false - - - name: Upload Linux Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: dist/linux - asset_name: linux.zip - asset_content_type: application/zip - - - name: Upload Windows Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: dist/windows - asset_name: windows.zip - asset_content_type: application/zip - - - name: Upload macOS Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: dist/macos - asset_name: macos.zip - asset_content_type: application/zip \ No newline at end of file + files: Release.txt + + # - name: Upload Linux Asset + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: dist/linux + # asset_name: linux.zip + # asset_content_type: application/zip + + # - name: Upload Windows Asset + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: dist/windows + # asset_name: windows.zip + # asset_content_type: application/zip + + # - name: Upload macOS Asset + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: dist/macos + # asset_name: macos.zip + # asset_content_type: application/zip \ No newline at end of file