From 28fcccce98596307ca62b139c97de53606273fd2 Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Sat, 21 Dec 2024 13:51:01 -0700 Subject: [PATCH] Reverted failed release once again... --- .github/workflows/release.yml | 361 ++++++++++++++++++---------------- CHANGELOG.md | 63 ------ Cargo.lock | 2 +- Cargo.toml | 2 +- 4 files changed, 194 insertions(+), 234 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a70c99..fb87533 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -150,8 +150,8 @@ jobs: name: artifacts path: artifacts - publish-github-release: - name: publish-github-release + bump-version: + name: bump-version needs: [build-release-artifacts] runs-on: ubuntu-latest steps: @@ -226,8 +226,8 @@ jobs: id: changelog run: | changelog=$(conventional-changelog -p angular -i CHANGELOG.md -s --from ${{ env.prev_version }} --to ${{ env.version }}) - echo "$changelog" > changelog.md - echo "changelog_body=$(cat changelog.md)" >> $GITHUB_ENV + echo "$changelog" > artifacts/changelog.md + echo "changelog_body=$(cat artifacts/changelog.md)" >> $GITHUB_ENV - name: Push changes env: @@ -235,10 +235,33 @@ jobs: run: | git push origin --follow-tags - - name: Fetch updated repository + publish-github-release: + name: publish-github-release + needs: [bump-version] + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Download all artifacts + uses: actions/download-artifact@v3 + with: + name: artifacts + path: artifacts + + - name: Ensure repository is up-to-date run: | - git fetch origin - git reset --hard origin/main + git fetch --all + git pull + + - name: Set environment variables + run: | + release_version="$(cat ./artifacts/release-version)" + echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV + changelog_body="$(cat ./artifacts/changelog.md)" + echo "changelog_body=$(cat artifacts/changelog.md)" >> $GITHUB_ENV - name: Create a GitHub Release uses: softprops/action-gh-release@v1 @@ -270,8 +293,8 @@ jobs: artifacts/managarr-armv7-gnu.sha256 artifacts/managarr-armv7-musl.tar.gz artifacts/managarr-armv7-musl.sha256 - tag_name: v${{ env.version }} - name: "v${{ env.version }}" + tag_name: v${{ env.RELEASE_VERSION }} + name: "v${{ env.RELEASE_VERSION }}" body: ${{ env.changelog_body }} draft: false prerelease: false @@ -282,190 +305,190 @@ jobs: name: artifacts path: artifacts - publish-chocolatey-package: - needs: [publish-github-release] - name: Publish Chocolatey Package - runs-on: windows-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 1 + # publish-chocolatey-package: + # needs: [publish-github-release] + # name: Publish Chocolatey Package + # runs-on: windows-latest + # steps: + # - name: Checkout repository + # uses: actions/checkout@v4 + # with: + # fetch-depth: 1 - - name: Get release artifacts - uses: actions/download-artifact@v3 - with: - name: artifacts - path: artifacts + # - name: Get release artifacts + # uses: actions/download-artifact@v3 + # with: + # name: artifacts + # path: artifacts - - name: Set release assets and version - shell: pwsh - run: | - # Read the first column from the SHA256 file - $windows_sha = Get-Content ./artifacts/managarr-windows.sha256 | ForEach-Object { $_.Split(' ')[0] } - Add-Content -Path $env:GITHUB_ENV -Value "WINDOWS_SHA=$windows_sha" + # - name: Set release assets and version + # shell: pwsh + # run: | + # # Read the first column from the SHA256 file + # $windows_sha = Get-Content ./artifacts/managarr-windows.sha256 | ForEach-Object { $_.Split(' ')[0] } + # Add-Content -Path $env:GITHUB_ENV -Value "WINDOWS_SHA=$windows_sha" - # Read the release version from the release-version file - $release_version = Get-Content ./artifacts/release-version - Add-Content -Path $env:GITHUB_ENV -Value "RELEASE_VERSION=$release_version" + # # Read the release version from the release-version file + # $release_version = Get-Content ./artifacts/release-version + # Add-Content -Path $env:GITHUB_ENV -Value "RELEASE_VERSION=$release_version" - - name: Validate release environment variables - run: | - echo "Release SHA windows: ${{ env.WINDOWS_SHA }}" - echo "Release version: ${{ env.RELEASE_VERSION }}" + # - name: Validate release environment variables + # run: | + # echo "Release SHA windows: ${{ env.WINDOWS_SHA }}" + # echo "Release version: ${{ env.RELEASE_VERSION }}" - - name: Package and Publish package to Chocolatey - run: | - mkdir ./deployment/chocolatey/tools - # Run packaging script - python "./deployment/chocolatey/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/chocolatey/managarr.nuspec.template" "./deployment/chocolatey/managarr.nuspec" ${{ env.WINDOWS_SHA }} - python "./deployment/chocolatey/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/chocolatey/chocolateyinstall.ps1.template" "./deployment/chocolatey/tools/chocolateyinstall.ps1" ${{ env.WINDOWS_SHA }} + # - name: Package and Publish package to Chocolatey + # run: | + # mkdir ./deployment/chocolatey/tools + # # Run packaging script + # python "./deployment/chocolatey/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/chocolatey/managarr.nuspec.template" "./deployment/chocolatey/managarr.nuspec" ${{ env.WINDOWS_SHA }} + # python "./deployment/chocolatey/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/chocolatey/chocolateyinstall.ps1.template" "./deployment/chocolatey/tools/chocolateyinstall.ps1" ${{ env.WINDOWS_SHA }} - # Publish to Chocolatey - cd ./deployment/chocolatey - choco pack - echo y | choco install managarr -dv -s . - $version = managarr --version - $version = $version -replace " ", "." - choco push $version.nupkg -s https://push.chocolatey.org/ --api-key ${{ secrets.CHOCOLATEY_API_KEY }}; + # # Publish to Chocolatey + # cd ./deployment/chocolatey + # choco pack + # echo y | choco install managarr -dv -s . + # $version = managarr --version + # $version = $version -replace " ", "." + # choco push $version.nupkg -s https://push.chocolatey.org/ --api-key ${{ secrets.CHOCOLATEY_API_KEY }}; - publish-homebrew-formula: - needs: [publish-github-release] - name: Update Homebrew formulas - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 1 + # publish-homebrew-formula: + # needs: [publish-github-release] + # name: Update Homebrew formulas + # runs-on: ubuntu-latest + # steps: + # - name: Checkout repository + # uses: actions/checkout@v4 + # with: + # fetch-depth: 1 - - name: Get release artifacts - uses: actions/download-artifact@v3 - with: - name: artifacts - path: artifacts + # - name: Get release artifacts + # uses: actions/download-artifact@v3 + # with: + # name: artifacts + # path: artifacts - - name: Set release assets and version - shell: bash - run: | - # Set environment variables - macos_sha="$(cat ./artifacts/managarr-macos.sha256 | awk '{print $1}')" - echo "MACOS_SHA=$macos_sha" >> $GITHUB_ENV - macos_sha_arm="$(cat ./artifacts/managarr-macos-arm64.sha256 | awk '{print $1}')" - echo "MACOS_SHA_ARM=$macos_sha_arm" >> $GITHUB_ENV - linux_sha="$(cat ./artifacts/managarr-linux-musl.sha256 | awk '{print $1}')" - echo "LINUX_SHA=$linux_sha" >> $GITHUB_ENV - release_version="$(cat ./artifacts/release-version)" - echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV + # - name: Set release assets and version + # shell: bash + # run: | + # # Set environment variables + # macos_sha="$(cat ./artifacts/managarr-macos.sha256 | awk '{print $1}')" + # echo "MACOS_SHA=$macos_sha" >> $GITHUB_ENV + # macos_sha_arm="$(cat ./artifacts/managarr-macos-arm64.sha256 | awk '{print $1}')" + # echo "MACOS_SHA_ARM=$macos_sha_arm" >> $GITHUB_ENV + # linux_sha="$(cat ./artifacts/managarr-linux-musl.sha256 | awk '{print $1}')" + # echo "LINUX_SHA=$linux_sha" >> $GITHUB_ENV + # release_version="$(cat ./artifacts/release-version)" + # echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV - - name: Validate release environment variables - run: | - echo "Release SHA macos: ${{ env.MACOS_SHA }}" - echo "Release SHA macos-arm: ${{ env.MACOS_SHA_ARM }}" - echo "Release SHA linux musl: ${{ env.LINUX_SHA }}" - echo "Release version: ${{ env.RELEASE_VERSION }}" + # - name: Validate release environment variables + # run: | + # echo "Release SHA macos: ${{ env.MACOS_SHA }}" + # echo "Release SHA macos-arm: ${{ env.MACOS_SHA_ARM }}" + # echo "Release SHA linux musl: ${{ env.LINUX_SHA }}" + # echo "Release version: ${{ env.RELEASE_VERSION }}" - - name: Execute Homebrew packaging script - run: | - # run packaging script - python "./deployment/homebrew/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/homebrew/managarr.rb.template" "./managarr.rb" ${{ env.MACOS_SHA }} ${{ env.MACOS_SHA_ARM }} ${{ env.LINUX_SHA }} + # - name: Execute Homebrew packaging script + # run: | + # # run packaging script + # python "./deployment/homebrew/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/homebrew/managarr.rb.template" "./managarr.rb" ${{ env.MACOS_SHA }} ${{ env.MACOS_SHA_ARM }} ${{ env.LINUX_SHA }} - - name: Push changes to Homebrew tap - env: - TOKEN: ${{ secrets.MANAGARR_GITHUB_TOKEN }} - run: | - # push to Git - git config --global user.name "Dark-Alex-17" - git config --global user.email "alex.j.tusa@gmail.com" - git clone https://Dark-Alex-17:${{ secrets.MANAGARR_GITHUB_TOKEN }}@github.com/Dark-Alex-17/homebrew-managarr.git - rm homebrew-managarr/Formula/managarr.rb - cp managarr.rb homebrew-managarr/Formula - cd homebrew-managarr - git add . - git diff-index --quiet HEAD || git commit -am "Update formula for Managarr release ${{ env.RELEASE_VERSION }}" - git push https://$TOKEN@github.com/Dark-Alex-17/homebrew-managarr.git + # - name: Push changes to Homebrew tap + # env: + # TOKEN: ${{ secrets.MANAGARR_GITHUB_TOKEN }} + # run: | + # # push to Git + # git config --global user.name "Dark-Alex-17" + # git config --global user.email "alex.j.tusa@gmail.com" + # git clone https://Dark-Alex-17:${{ secrets.MANAGARR_GITHUB_TOKEN }}@github.com/Dark-Alex-17/homebrew-managarr.git + # rm homebrew-managarr/Formula/managarr.rb + # cp managarr.rb homebrew-managarr/Formula + # cd homebrew-managarr + # git add . + # git diff-index --quiet HEAD || git commit -am "Update formula for Managarr release ${{ env.RELEASE_VERSION }}" + # git push https://$TOKEN@github.com/Dark-Alex-17/homebrew-managarr.git - publish-docker-image: - needs: [publish-github-release] - name: Publishing Docker image to Docker Hub - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 1 + # publish-docker-image: + # needs: [publish-github-release] + # name: Publishing Docker image to Docker Hub + # runs-on: ubuntu-latest + # steps: + # - name: Checkout repository + # uses: actions/checkout@v4 + # with: + # fetch-depth: 1 - - name: Get release artifacts - uses: actions/download-artifact@v3 - with: - name: artifacts - path: artifacts + # - name: Get release artifacts + # uses: actions/download-artifact@v3 + # with: + # name: artifacts + # path: artifacts - - name: Set version variable - run: | - version="$(cat artifacts/release-version)" - echo "version=$version" >> $GITHUB_ENV + # - name: Set version variable + # run: | + # version="$(cat artifacts/release-version)" + # echo "version=$version" >> $GITHUB_ENV - - name: Validate release environment variables - run: | - echo "Release version: ${{ env.version }}" + # - name: Validate release environment variables + # run: | + # echo "Release version: ${{ env.version }}" - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + # - name: Login to Docker Hub + # uses: docker/login-action@v3 + # with: + # username: ${{ secrets.DOCKER_USERNAME }} + # password: ${{ secrets.DOCKER_PASSWORD }} - - name: Push to Docker Hub - uses: docker/build-push-action@v5 - with: - context: . - file: Dockerfile - platforms: linux/amd64,linux/arm64 - push: true - tags: darkalex17/testing:latest, darkalex17/testing:${{ env.version }} + # - name: Push to Docker Hub + # uses: docker/build-push-action@v5 + # with: + # context: . + # file: Dockerfile + # platforms: linux/amd64,linux/arm64 + # push: true + # tags: darkalex17/testing:latest, darkalex17/testing:${{ env.version }} - publish-crate: - needs: publish-github-release - name: Publish Crate - runs-on: ubuntu-latest - steps: - - name: Check if actor is repository owner - if: ${{ github.actor != github.repository_owner }} - run: | - echo "You are not authorized to run this workflow." - exit 1 + # publish-crate: + # needs: publish-github-release + # name: Publish Crate + # runs-on: ubuntu-latest + # steps: + # - name: Check if actor is repository owner + # if: ${{ github.actor != github.repository_owner }} + # run: | + # echo "You are not authorized to run this workflow." + # exit 1 - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # fetch-depth: 0 - - name: Ensure repository is up-to-date - run: | - git fetch --all - git pull + # - name: Ensure repository is up-to-date + # run: | + # git fetch --all + # git pull - - uses: actions/cache@v3 - name: Cache Cargo registry - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }} + # - uses: actions/cache@v3 + # name: Cache Cargo registry + # with: + # path: ~/.cargo/registry + # key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }} - - uses: actions/cache@v3 - with: - path: ~/.cargo/bin - key: ${{ runner.os }}-cargo-bin-${{ hashFiles('.github/workflows/release.yml') }} + # - uses: actions/cache@v3 + # with: + # path: ~/.cargo/bin + # key: ${{ runner.os }}-cargo-bin-${{ hashFiles('.github/workflows/release.yml') }} - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable + # - name: Install Rust stable + # uses: dtolnay/rust-toolchain@stable - - uses: katyo/publish-crates@v2 - with: - registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} + # - uses: katyo/publish-crates@v2 + # with: + # registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e1eceb..33208c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,69 +5,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## v0.4.2 (2024-12-20) - -### Fix - -- **sonarr**: Pass the series ID alongside all UpdateAndScan events when publishing to the networking channel -- **sonarr**: pass the series ID alongside all TriggerAutomaticSeriesSearch events when publishing to the networking channel -- **sonarr**: Pass the series ID and season number alongside all TriggerAutomaticSeasonSearch events when publishing to the networking channel -- **sonarr**: Pass the episode ID alongside all TriggerAutomaticEpisodeSearch events when publishing to the networking channel -- **sonarr**: Pass the episode ID alongside all ToggleEpisodeMonitoring events when publishing to the networking channel -- **sonarr**: Pass the series ID and season number alongside all toggle season monitoring events when publishing to the networking channel -- **sonarr**: Pass the indexer ID directly alongside all TestIndexer events when publishing to the networking channel -- **sonarr**: Provide the task name directly alongside all StartTask events when publishing to the networking channel -- **sonarr**: Pass the search query directly to the networking channel when searching for a new series -- **sonarr**: Pass the series ID alongside all GetSeriesHistory events when publishing to the networking channel -- **sonarr**: Pass the series ID alongside all GetSeriesDetails events when publishing to the networking channel -- **sonarr**: Pass series ID and season number alongside all ManualSeasonSearch events when publishing to the networking channel -- **sonarr**: Provide the series ID and season number alongside all GetSeasonHistory events when publishing to the networking channel -- **sonarr**: Pass the episode ID alongside all ManualEpisodeSearch events when publishing to the networking channel -- **sonarr**: Pass events alongside all GetLogs events when publishing to the networking channel -- **sonarr**: Pass the episode ID alongside all GetEpisodeHistory events when publishing to the networking channel -- **sonarr**: Pass series ID alongside all GetEpisodeFiles events when publishing to the networking channel -- **sonarr**: Pass series ID alognside all GetEpisodes events when publishing to the networking channel -- **sonarr**: Pass the episode ID alongside all GetEpisodeDetails events when publishing to the networking channel -- **sonarr**: Pass history events alongside all GetHistory events when publishing to the networking channel -- **sonarr**: Construct and pass edit series parameters alongside all EditSeries events when publishing to the networking channel -- **sonarr**: Construct and pass edit indexer parameters alongside all EditIndexer events when publishing to the networking channel -- **sonarr**: Construct and pass edit all indexer settings alongside all EditAllIndexerSettings events when publishing to the networking channel -- **sonarr**: Construct and pass delete series params alongside all DeleteSeries events when publishing to the networking channel -- **sonarr**: Corrected a bug that would cause a crash if a user spams the ESC key while searching for a new series and the search results are still loading -- **sonarr**: Pass the root folder ID alongside all DeleteRootFolder events when publishing to the networking channel -- **sonarr**: Pass the indexer ID alongside all DeleteIndexer events when publishing to the networking channel -- **sonarr**: Pass the episode file ID alongside all DeleteEpisodeFile events when publishing to the networking channel -- **sonarr**: Pass the download ID alongside all DeleteDownload events published to the networking channel -- **sonarr**: Pass the blocklist item ID alongside the DeleteBlocklistItem event when publishing to the networking channel -- **sonarr**: Construct and pass the add series body alongside AddSeries events when publishing to the networking channel -- **sonarr**: Construct and pass the AddRootFolderBody alongside all AddRootFolder events when publishing to the networking channel -- **radarr**: Pass the movie ID alongside all UpdateAndScan events published to the networking channel -- **radarr**: Provide the movie ID alongside all TriggerAutomaticMovieSearch events when publishing to the networking channel -- **radarr**: Pass in the indexer id with all TestIndexer events when publishing to the networking channel -- **radarr**: Pass in the task name alongside the StartTask event when publishing to the networking channel -- **radarr**: Pass in the search query for the SearchNewMovie event when publishing to the networking channel -- **radarr**: Pass in the movie ID alongside the GetReleases event when publishing to the networking channel -- **radarr**: Pass in the movie ID alongside the GetMovieHistory event when publishing to the networking channel -- **radarr**: Pass the movie ID in alongside the GetMovieDetaisl event when publishing to the networking channel -- **radarr**: Provide the movie id alongside the GetMovieCredits event when publishing to the networking channel -- **radarr**: Pass the number of log events to fetch in with the GetLogs event when publishing to the networking channel -- **radarr**: Construct and pass the edit movie parameters alongside the EditMovie event when publishing to the networking channel -- **radarr**: Construct and pass params when publishing the EditIndexer event to the networking channel -- **radarr**: Construct and pass edit collection parameters alongside the EditCollection event when publishing to the networking channel -- **radarr**: Build and pass the edit indexer settings body with the EditAllIndexerSettings event when publishing to the networking channel -- **radarr**: Send the parameters alongside the DownloadRelease event when publishing to the networking channel -- **radarr**: Pass the root folder ID in with the DeleteRootFolder event when publishing to the networking channel -- Pass the delete movie params in with the DeleteMovie event when publishing to the networking channel -- Pass the indexer ID in with the DeleteIndexer event when sending to the networking channel -- Pass the download ID directly in the DeleteDownload event when publishing into the networking channel -- Blocklist Item ID passed in the DeleteBlocklistItem event when sent to the networking channel -- AddRootFolderBody now constructed prior to AddRootFolder event being sent down the network channel -- Cancel all requests when switching Servarr tabs to both improve performance and fix issue #15 -- **add_movie_handler_tests**: Added in a forgotten test for the build_add_movie_body function -- Missing tagged version of docker builds in release flow -- AddMovie Radarr event is now populated in the dispatch thread before being sent to the network thread -- dynamically load servarrs in UI based on what configs are provided - ## v0.4.1 (2024-12-14) ### Feat diff --git a/Cargo.lock b/Cargo.lock index f41912b..fa73330 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1316,7 +1316,7 @@ dependencies = [ [[package]] name = "managarr" -version = "0.4.2" +version = "0.4.1" dependencies = [ "anyhow", "assert_cmd", diff --git a/Cargo.toml b/Cargo.toml index 23798eb..8037d75 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "managarr" -version = "0.4.2" +version = "0.4.1" authors = ["Alex Clarke "] description = "A TUI and CLI to manage your Servarrs" keywords = ["managarr", "ratatui", "dashboard", "servarr", "tui"]