From e45c64e47fe40e6a81587a215ac7d3ae8aa35ed0 Mon Sep 17 00:00:00 2001 From: Ben Forge <74168521+BenCheung0422@users.noreply.github.com> Date: Wed, 1 Jan 2025 23:20:33 +0800 Subject: [PATCH 1/9] Create release.yml --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ffb61ae --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +on: + release: + types: [created] + + +jobs: + release: + name: release ${{ matrix.target }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - target: x86_64-pc-windows-gnu + archive: zip + - target: x86_64-unknown-linux-musl + archive: tar.gz tar.xz tar.zst + - target: x86_64-apple-darwin + archive: zip + steps: + - uses: actions/checkout@master + - name: Compile and release + uses: rust-build/rust-build.action@1.4.5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + RUSTTARGET: ${{ matrix.target }} + EXTRA_FILES: "README.md LICENSE" + ARCHIVE_TYPES: ${{ matrix.archive }} From 797284f59b72e34a845036d6ea4aa059b4a48f86 Mon Sep 17 00:00:00 2001 From: Ben Forge <74168521+BenCheung0422@users.noreply.github.com> Date: Wed, 1 Jan 2025 23:23:35 +0800 Subject: [PATCH 2/9] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ffb61ae..60d4d60 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@master - name: Compile and release - uses: rust-build/rust-build.action@1.4.5 + uses: rust-build/rust-build.action@v1.4.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From c9b8de9e4fc3790a68090692c670a43b129053a0 Mon Sep 17 00:00:00 2001 From: Ben Forge <74168521+BenCheung0422@users.noreply.github.com> Date: Wed, 1 Jan 2025 23:41:44 +0800 Subject: [PATCH 3/9] Update release.yml --- .github/workflows/release.yml | 49 +++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60d4d60..cbb993e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,25 +5,42 @@ on: jobs: release: - name: release ${{ matrix.target }} - runs-on: ubuntu-latest strategy: - fail-fast: false matrix: include: - - target: x86_64-pc-windows-gnu - archive: zip - - target: x86_64-unknown-linux-musl - archive: tar.gz tar.xz tar.zst + - target: aarch64-unknown-linux-gnu + os: ubuntu-latest + - target: aarch64-apple-darwin + os: macos-latest + - target: x86_64-unknown-linux-gnu + os: ubuntu-latest - target: x86_64-apple-darwin - archive: zip + os: macos-latest + - target: x86_64-pc-windows-msvc + os: windows-latest + - target: aarch64-pc-windows-msvc + os: windows-latest + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@master - - name: Compile and release - uses: rust-build/rust-build.action@v1.4.5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 + - uses: taiki-e/upload-rust-binary-action@v1 with: - RUSTTARGET: ${{ matrix.target }} - EXTRA_FILES: "README.md LICENSE" - ARCHIVE_TYPES: ${{ matrix.archive }} + # (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload. + # Note that glob pattern is not supported yet. + bin: torrent-cleaner + # (optional) Target triple, default is host triple. + # This is optional but it is recommended that this always be set to + # clarify which target you are building for if macOS is included in + # the matrix because GitHub Actions changed the default architecture + # of macos-latest since macos-14. + target: ${{ matrix.target }} + # (optional) On which platform to distribute the `.tar.gz` file. + # [default value: unix] + # [possible values: all, unix, windows, none] + tar: unix + # (optional) On which platform to distribute the `.zip` file. + # [default value: windows] + # [possible values: all, unix, windows, none] + zip: windows + # (required) GitHub token for uploading assets to GitHub Releases. + token: ${{ secrets.GITHUB_TOKEN }} From 8e99491aea840171e28d2f8368d0b9ac3f31a571 Mon Sep 17 00:00:00 2001 From: Ben Forge <74168521+BenCheung0422@users.noreply.github.com> Date: Wed, 1 Jan 2025 23:56:07 +0800 Subject: [PATCH 4/9] Update release.yml --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cbb993e..2a38a30 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - run: sudo apt-get install libssl libssl-dev - uses: taiki-e/upload-rust-binary-action@v1 with: # (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload. @@ -42,5 +43,6 @@ jobs: # [default value: windows] # [possible values: all, unix, windows, none] zip: windows + include: LICENSE,README.md # (required) GitHub token for uploading assets to GitHub Releases. token: ${{ secrets.GITHUB_TOKEN }} From b427c5ca68396c97b39c228080ce8120edabec96 Mon Sep 17 00:00:00 2001 From: Ben Forge <74168521+BenCheung0422@users.noreply.github.com> Date: Wed, 1 Jan 2025 23:58:56 +0800 Subject: [PATCH 5/9] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a38a30..397860a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - run: sudo apt-get install libssl libssl-dev + - run: sudo apt-get install libssl3 libssl-dev - uses: taiki-e/upload-rust-binary-action@v1 with: # (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload. From 55e22f595a28abba8e85d03e4a5e87d850f1e2c0 Mon Sep 17 00:00:00 2001 From: Ben Forge <74168521+BenCheung0422@users.noreply.github.com> Date: Thu, 2 Jan 2025 00:02:40 +0800 Subject: [PATCH 6/9] Update release.yml --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 397860a..d3000bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,12 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - run: sudo apt-get install libssl3 libssl-dev + - name: Install # Source: https://stackoverflow.com/a/57948488 + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + sudo apt-get install libssl3 libssl-dev + fi + shell: bash - uses: taiki-e/upload-rust-binary-action@v1 with: # (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload. From be97957c0e2cbad0b0d7962382772d5e80ef56d1 Mon Sep 17 00:00:00 2001 From: Ben Forge <74168521+BenCheung0422@users.noreply.github.com> Date: Thu, 2 Jan 2025 00:05:02 +0800 Subject: [PATCH 7/9] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d3000bc..8b56a6c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: - name: Install # Source: https://stackoverflow.com/a/57948488 run: | if [ "$RUNNER_OS" == "Linux" ]; then - sudo apt-get install libssl3 libssl-dev + sudo apt-get install openssl libssl-dev fi shell: bash - uses: taiki-e/upload-rust-binary-action@v1 From ee5f8a01294ac949db31149f812c1a6a6c232f1f Mon Sep 17 00:00:00 2001 From: Ben Forge <74168521+BenCheung0422@users.noreply.github.com> Date: Thu, 2 Jan 2025 00:10:49 +0800 Subject: [PATCH 8/9] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8b56a6c..a792358 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: - name: Install # Source: https://stackoverflow.com/a/57948488 run: | if [ "$RUNNER_OS" == "Linux" ]; then - sudo apt-get install openssl libssl-dev + sudo apt-get install pkg-config libssl-dev fi shell: bash - uses: taiki-e/upload-rust-binary-action@v1 From 9298c189ade55347a1696d41ad47c13a9b290c57 Mon Sep 17 00:00:00 2001 From: Ben Forge <74168521+BenCheung0422@users.noreply.github.com> Date: Thu, 2 Jan 2025 00:13:33 +0800 Subject: [PATCH 9/9] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a792358..7a3bdbe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: - name: Install # Source: https://stackoverflow.com/a/57948488 run: | if [ "$RUNNER_OS" == "Linux" ]; then - sudo apt-get install pkg-config libssl-dev + sudo apt-get install pkg-config openssl libssl-dev fi shell: bash - uses: taiki-e/upload-rust-binary-action@v1