diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a25d96831..c593fe800 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,29 +31,10 @@ jobs: # - run: CARGO_BAZEL_ISOLATED=0 CARGO_BAZEL_REPIN=true bazelisk test --test_output=all //clash_lib/... //clash/... - uses: Swatinem/rust-cache@v2 - run: cargo test --all --all-features - - release: - name: Create Github Release - if: contains(github.ref, 'tags/v') - needs: [test] - runs-on: ubuntu-latest - steps: - - name: Create Release - id: create_release - uses: marvinpinto/action-automatic-releases@latest - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - - name: Output Release URL File - run: echo "${{ steps.create_release.outputs.id }}" > release_id.txt - - name: Save Release URL File for publish - uses: actions/upload-artifact@v3 - with: - name: release_id - path: release_id.txt publish: if: contains(github.ref, 'tags/v') - needs: [test, release] + needs: [test] runs-on: ${{ matrix.os }} strategy: matrix: @@ -73,31 +54,21 @@ jobs: submodules: recursive - uses: actions/setup-go@v4 with: - go-version: '1.20' - - name: Load Release URL File from release job - uses: actions/download-artifact@v3 - with: - path: release_id - name: release_id + go-version: '1.20' - uses: actions-rs/toolchain@v1 with: toolchain: stable - uses: Swatinem/rust-cache@v2 - name: Build run: sh ./scripts/build.sh "${{ matrix.targets }}" - - name: Get Release Upload URL - id: get_release_info - run: | - value=`cat release_id/release_id.txt` - echo "upload_id=$value" >> $GITHUB_OUTPUT - env: - TAG_REF_NAME: ${{ github.ref }} - REPOSITORY_NAME: ${{ github.repository }} + - name: Create Release + id: create_release + uses: softprops/action-gh-release@v1 - name: Upload Release Asset id: upload-release-asset uses: dwenegar/upload-release-assets@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - release_id: ${{ steps.get_release_info.outputs.upload_id }} + release_id: ${{ steps.create_release.outputs.id }} assets_path: target/artifacts