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