diff --git a/.github/workflows/pake_build.yaml b/.github/workflows/pake_build.yaml index 6e53d7d..01afbeb 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: @@ -82,9 +79,9 @@ 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 + 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..60f7d32 100644 --- a/.github/workflows/pake_build_with_cache.yaml +++ b/.github/workflows/pake_build_with_cache.yaml @@ -1,6 +1,17 @@ name: Build App with Cache on: - workflow_dispatch: {} + workflow_dispatch: + inputs: + version: + description: "tag version" + required: true + 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: @@ -79,12 +90,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: ${{ inputs.is_pre_release }} + artifacts: "output/*/*.*" + tag: ${{ inputs.version }} + token: ${{ secrets.GITHUB_TOKEN }} - name: rust cache store uses: actions/cache/save@v3