From 9a3dc8caa7fd31a73f787d1d859559c4920159a3 Mon Sep 17 00:00:00 2001 From: dormant-user Date: Mon, 24 Jun 2024 00:18:53 -0500 Subject: [PATCH] Release `v1.3.0` Upgrade all dependencies Redo GH actions --- .github/workflows/none.yml | 4 +-- .github/workflows/rust.yml | 55 ++++++++++++++++++++------------------ Cargo.toml | 36 ++++++++++++------------- src/constant.rs | 1 + 4 files changed, 49 insertions(+), 47 deletions(-) diff --git a/.github/workflows/none.yml b/.github/workflows/none.yml index 45c7706..0d803da 100644 --- a/.github/workflows/none.yml +++ b/.github/workflows/none.yml @@ -12,9 +12,7 @@ on: jobs: none-shall-pass: - runs-on: - - self-hosted - - Ubuntu + runs-on: thevickypedia-lite steps: - uses: thevickypedia/none-shall-pass@v5 with: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 54cb668..c478f43 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,7 +13,7 @@ env: jobs: release: - runs-on: ubuntu-latest + runs-on: thevickypedia-lite permissions: contents: write outputs: @@ -117,32 +117,24 @@ jobs: matrix: platform: - release_for: Linux-x86_64 - os: ubuntu-20.04 - target: x86_64-unknown-linux-gnu + os: linux-amd64 bin: ${{ needs.release.outputs.bin-name }} name: ${{ needs.release.outputs.pkg-name }}-Linux-x86_64.tar.gz - command: build - release_for: Windows-x86_64 - os: windows-latest - target: x86_64-pc-windows-msvc + os: windows-amd64 bin: ${{ needs.release.outputs.bin-name }}.exe name: ${{ needs.release.outputs.pkg-name }}-Windows-x86_64.zip - command: build - release_for: macOS-x86_64 - os: macOS-latest - target: x86_64-apple-darwin + os: darwin-amd64 bin: ${{ needs.release.outputs.bin-name }} name: ${{ needs.release.outputs.pkg-name }}-Darwin-x86_64.tar.gz - command: build - - release_for: RaspberryPi - os: ubuntu-20.04 - target: arm-unknown-linux-gnueabihf + - release_for: macOS-arm64 + os: darwin-arm64 bin: ${{ needs.release.outputs.bin-name }} - name: ${{ needs.release.outputs.pkg-name }}-RaspberryPi.tar.gz - command: build + name: ${{ needs.release.outputs.pkg-name }}-Darwin-x86_64.tar.gz name: Upload asset for ${{ matrix.platform.release_for }} runs-on: ${{ matrix.platform.os }} @@ -162,22 +154,30 @@ jobs: printf '*%.0s' {1..60} && printf "\n" echo "Updated rust version: $(rustc --version)" printf '*%.0s' {1..60} && printf "\n" + shell: bash - name: Install OpenSSL static for Windows # https://github.com/sfackler/rust-openssl/issues/1086 - if: ${{ matrix.platform.os == 'windows-latest' }} + if: startsWith(matrix.platform.os, 'windows') run: | - mkdir \Tools + if (-Not (Test-Path -Path \Tools)) { + mkdir \Tools + } cd \Tools - git clone https://github.com/Microsoft/vcpkg.git + if (-Not (Test-Path -Path .\vcpkg)) { + git clone https://github.com/Microsoft/vcpkg.git + } cd vcpkg echo ("vcpkg_dir=" + $pwd) >> $env:GITHUB_ENV - .\bootstrap-vcpkg.bat + if (-Not (Test-Path -Path .\vcpkg.exe)) { + .\bootstrap-vcpkg.bat + } .\vcpkg.exe install openssl:x64-windows-static + shell: pwsh - name: Build run: | - if [ "${{ matrix.platform.os }}" == "windows-latest" ]; then + if [[ "${{ matrix.platform.os }}" =~ ^windows ]]; then echo "Setting vcpkg env vars for OpenSSL in Windows" export OPENSSL_DIR="${{ env.vcpkg_dir }}\installed\x64-windows-static" export OPENSSL_STATIC="Yes" @@ -188,7 +188,7 @@ jobs: - name: Run tests run: | - if [ "${{ matrix.platform.os }}" == "windows-latest" ]; then + if [[ "${{ matrix.platform.os }}" =~ ^windows ]]; then echo "Setting vcpkg env vars for OpenSSL in Windows" export OPENSSL_DIR="${{ env.vcpkg_dir }}\installed\x64-windows-static" export OPENSSL_STATIC="Yes" @@ -197,19 +197,21 @@ jobs: cargo test --no-run shell: bash - - name: Copy Artifacts (Windows) - if: ${{ matrix.platform.os == 'windows-latest' }} + - name: Compress and Copy Artifact (Windows) + if: startsWith(matrix.platform.os, 'windows') run: | mkdir -p ${{ needs.release.outputs.pkg-name }} cp target/release/${{ matrix.platform.bin }} ${{ needs.release.outputs.pkg-name }}/${{ matrix.platform.bin }} Compress-Archive -DestinationPath ${{ matrix.platform.name }} -Path ${{ needs.release.outputs.pkg-name }}/ + shell: pwsh - - name: Copy Artifacts (macOS/Ubuntu) - if: ${{ matrix.platform.os != 'windows-latest' }} + - name: Compress and Copy Artifact (macOS/Ubuntu) + if: "!startsWith(matrix.platform.os, 'windows')" run: | mkdir -p ${{ needs.release.outputs.pkg-name }} cp target/release/${{ matrix.platform.bin }} ${{ needs.release.outputs.pkg-name }}/${{ matrix.platform.bin }} tar -zcvf ${{ matrix.platform.name }} ${{ needs.release.outputs.pkg-name }}/ + shell: bash - name: Upload Asset to Release run: | @@ -222,7 +224,7 @@ jobs: publish-crate: needs: upload_assets if: needs.release.outputs.release-flag == 'true' - runs-on: ubuntu-latest + runs-on: thevickypedia-lite steps: - uses: actions/checkout@v4 - name: Update Rust @@ -234,6 +236,7 @@ jobs: printf '*%.0s' {1..60} && printf "\n" echo "Updated rust version: $(rustc --version)" printf '*%.0s' {1..60} && printf "\n" + shell: bash - name: Release Crate run: | cargo login ${{ secrets.CRATES_TOKEN }} diff --git a/Cargo.toml b/Cargo.toml index 14ecd5d..ef44d62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "RuStream" -version = "1.3.0-a" +version = "1.3.0" description = "Self-hosted Streaming Engine, that can render media files via authenticated sessions." license = "MIT" documentation = "https://docs.rs/RuStream" @@ -26,26 +26,26 @@ path = "src/main.rs" rustdoc-args = ["--document-private-items"] [dependencies] -actix-rt = "2.9.0" -actix-web = { version = "4.5.1", features = ["openssl"] } -actix-files = "0.6.5" +actix-rt = "2.10.0" +actix-web = { version = "4.8.0", features = ["openssl"] } +actix-files = "0.6.6" actix-cors = "0.7.0" -actix-multipart = "0.6.1" -serde = { version = "1.0.196", features = ["derive"] } -serde_json = "1.0.113" -chrono = { version = "0.4.33", features = ["serde"] } -env_logger = "0.11.1" -log = "0.4.20" -base64 = "0.22.0" +actix-multipart = "0.6.2" +serde = { version = "1.0.203", features = ["derive"] } +serde_json = "1.0.117" +chrono = { version = "0.4.38", features = ["serde"] } +env_logger = "0.11.3" +log = "0.4.21" +base64 = "0.22.1" sha2 = "0.10.8" rand = "0.8.5" -fernet = "0.2.1" -minijinja = { version = "1.0.12", features = ["loader"] } -url = "2.5.0" -regex = "1.5" -walkdir = "2.3.2" -openssl = "0.10" +fernet = "0.2.2" +minijinja = { version = "2.0.2", features = ["loader"] } +url = "2.5.2" +regex = "1.10.5" +walkdir = "2.5.0" +openssl = "0.10.64" dotenv = "0.15.0" futures-util = "0.3.30" [target.'cfg(target_os = "linux")'.dependencies] -openssl = { version = "0.10", features = ["vendored"] } +openssl = { version = "0.10.64", features = ["vendored"] } diff --git a/src/constant.rs b/src/constant.rs index a476175..6af803e 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -8,6 +8,7 @@ pub static IMAGE_FORMATS: [&str; 7] = ["jpeg", "jpg", "png", "gif", "bmp", "svg" pub static SECURE_INDEX: &str = "SECURE_INDEX"; /// Struct to store the cargo information gathered at compile time using the `env!` macro. +#[allow(dead_code)] #[derive(Debug, Clone)] pub struct MetaData { pub crate_name: String,