diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b50d74f..f970ea9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ env: RUST_BACKTRACE: 1 jobs: - testing: + build: strategy: fail-fast: true matrix: @@ -41,8 +41,35 @@ jobs: run: cargo build --verbose - name: Run tests run: cargo test --verbose - - name: Upload target directory + - name: List target directory + run: ls -R target + - name: Upload debug binaries uses: actions/upload-artifact@v3 with: - name: build-artifacts - path: target/ + name: debug-binaries + path: target/debug/**/*.exe # 适用于 Windows,如果是 Linux/MacOS,则为 target/debug/**/* + - name: Upload release binaries + uses: actions/upload-artifact@v3 + with: + name: release-binaries + path: target/release/**/*.exe # 适用于 Windows,如果是 Linux/MacOS,则为 target/release/**/* + + download: + runs-on: ubuntu-22.04 + + needs: build + + steps: + - name: Download all Artifacts + uses: actions/download-artifact@v4.1.7 + with: + path: downloaded-artifacts + + - name: Download specific artifact + uses: actions/download-artifact@v4.1.7 + with: + name: debug-binaries + path: downloaded-debug-binaries + + - name: List downloaded files + run: ls -R downloaded-artifacts