From c2151c5f5b2da4f9a492edf10af915a4a71009af Mon Sep 17 00:00:00 2001 From: Tlntin Date: Fri, 24 Mar 2023 14:17:20 +0800 Subject: [PATCH 1/3] Update github action s upload method --- .github/workflows/pake_build.yaml | 17 +++++++--------- .github/workflows/pake_build_with_cache.yaml | 21 +++++++++++++------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/pake_build.yaml b/.github/workflows/pake_build.yaml index 6e53d7d..dd1bfdc 100644 --- a/.github/workflows/pake_build.yaml +++ b/.github/workflows/pake_build.yaml @@ -17,17 +17,14 @@ jobs: os: ubuntu-20.04 rust: stable target: x86_64-unknown-linux-musl - # archive-name: target-linux.tar.gz - build: windows os: windows-latest rust: stable-x86_64-msvc target: x86_64-pc-windows-msvc - # archive-name: target-windows.tar.gz - build: macos os: macos-latest rust: stable target: x86_64-apple-darwin - # archive-name: target-macos.tar.gz fail-fast: false steps: @@ -81,10 +78,10 @@ jobs: run: | npm run build:all-windows - - name: Upload files - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - UPLOADTOOL_ISPRERELEASE: true - run: | - curl -L https://github.com/probonopd/uploadtool/raw/master/upload.sh --output upload.sh - bash upload.sh output/*/*.* + - name: Upload files (only for Windows) + uses: ncipollo/release-action@v1 + if: matrix.target == 'x86_64-pc-windows-msvc' + with: + allowUpdates: true + artifacts: "output/*/*.*" + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pake_build_with_cache.yaml b/.github/workflows/pake_build_with_cache.yaml index db3ba57..dd5bd7f 100644 --- a/.github/workflows/pake_build_with_cache.yaml +++ b/.github/workflows/pake_build_with_cache.yaml @@ -1,6 +1,11 @@ name: Build App with Cache on: - workflow_dispatch: {} + workflow_dispatch: + inputs: + version: + description: "tag version" + required: true + default: "v0.0.1" jobs: build: @@ -79,12 +84,14 @@ jobs: npm run build:all-windows - name: Upload files - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - UPLOADTOOL_ISPRERELEASE: true - run: | - curl -L https://github.com/probonopd/uploadtool/raw/master/upload.sh --output upload.sh - bash upload.sh output/*/*.* + # arg info: https://github.com/ncipollo/release-action#release-action + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + prerelease: true + artifacts: "output/*/*.*" + tag: ${{ inputs.version }} + token: ${{ secrets.GITHUB_TOKEN }} - name: rust cache store uses: actions/cache/save@v3 From 93c5c1baa8cc04f7aedeb486fd2ddb830ddba977 Mon Sep 17 00:00:00 2001 From: Tlntin Date: Fri, 24 Mar 2023 14:40:00 +0800 Subject: [PATCH 2/3] update github actions for test --- .github/workflows/pake_build_with_cache.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pake_build_with_cache.yaml b/.github/workflows/pake_build_with_cache.yaml index dd5bd7f..60f7d32 100644 --- a/.github/workflows/pake_build_with_cache.yaml +++ b/.github/workflows/pake_build_with_cache.yaml @@ -5,7 +5,13 @@ on: version: description: "tag version" required: true - default: "v0.0.1" + default: "V0.0.1" + is_pre_release: + description: "pre-release or release, is true, is pre-release" + required: true + type: boolean + default: true + jobs: build: @@ -88,7 +94,7 @@ jobs: uses: ncipollo/release-action@v1 with: allowUpdates: true - prerelease: true + prerelease: ${{ inputs.is_pre_release }} artifacts: "output/*/*.*" tag: ${{ inputs.version }} token: ${{ secrets.GITHUB_TOKEN }} From 31cfe414020d4ed5454452f355e397f6cb49f6a6 Mon Sep 17 00:00:00 2001 From: Tlntin Date: Fri, 24 Mar 2023 14:48:00 +0800 Subject: [PATCH 3/3] update github actions for build --- .github/workflows/pake_build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pake_build.yaml b/.github/workflows/pake_build.yaml index dd1bfdc..01afbeb 100644 --- a/.github/workflows/pake_build.yaml +++ b/.github/workflows/pake_build.yaml @@ -78,9 +78,9 @@ jobs: run: | npm run build:all-windows - - name: Upload files (only for Windows) + - name: Upload files + # arg info: https://github.com/ncipollo/release-action#release-action uses: ncipollo/release-action@v1 - if: matrix.target == 'x86_64-pc-windows-msvc' with: allowUpdates: true artifacts: "output/*/*.*"