Reverted failed release once again...

This commit is contained in:
2024-12-21 13:51:01 -07:00
parent 2ba3e56772
commit 28fcccce98
4 changed files with 194 additions and 234 deletions
+192 -169
View File
@@ -150,8 +150,8 @@ jobs:
name: artifacts name: artifacts
path: artifacts path: artifacts
publish-github-release: bump-version:
name: publish-github-release name: bump-version
needs: [build-release-artifacts] needs: [build-release-artifacts]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -226,8 +226,8 @@ jobs:
id: changelog id: changelog
run: | run: |
changelog=$(conventional-changelog -p angular -i CHANGELOG.md -s --from ${{ env.prev_version }} --to ${{ env.version }}) changelog=$(conventional-changelog -p angular -i CHANGELOG.md -s --from ${{ env.prev_version }} --to ${{ env.version }})
echo "$changelog" > changelog.md echo "$changelog" > artifacts/changelog.md
echo "changelog_body=$(cat changelog.md)" >> $GITHUB_ENV echo "changelog_body=$(cat artifacts/changelog.md)" >> $GITHUB_ENV
- name: Push changes - name: Push changes
env: env:
@@ -235,10 +235,33 @@ jobs:
run: | run: |
git push origin --follow-tags 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: | run: |
git fetch origin git fetch --all
git reset --hard origin/main 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 - name: Create a GitHub Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
@@ -270,8 +293,8 @@ jobs:
artifacts/managarr-armv7-gnu.sha256 artifacts/managarr-armv7-gnu.sha256
artifacts/managarr-armv7-musl.tar.gz artifacts/managarr-armv7-musl.tar.gz
artifacts/managarr-armv7-musl.sha256 artifacts/managarr-armv7-musl.sha256
tag_name: v${{ env.version }} tag_name: v${{ env.RELEASE_VERSION }}
name: "v${{ env.version }}" name: "v${{ env.RELEASE_VERSION }}"
body: ${{ env.changelog_body }} body: ${{ env.changelog_body }}
draft: false draft: false
prerelease: false prerelease: false
@@ -282,190 +305,190 @@ jobs:
name: artifacts name: artifacts
path: artifacts path: artifacts
publish-chocolatey-package: # publish-chocolatey-package:
needs: [publish-github-release] # needs: [publish-github-release]
name: Publish Chocolatey Package # name: Publish Chocolatey Package
runs-on: windows-latest # runs-on: windows-latest
steps: # steps:
- name: Checkout repository # - name: Checkout repository
uses: actions/checkout@v4 # uses: actions/checkout@v4
with: # with:
fetch-depth: 1 # fetch-depth: 1
- name: Get release artifacts # - name: Get release artifacts
uses: actions/download-artifact@v3 # uses: actions/download-artifact@v3
with: # with:
name: artifacts # name: artifacts
path: artifacts # path: artifacts
- name: Set release assets and version # - name: Set release assets and version
shell: pwsh # shell: pwsh
run: | # run: |
# Read the first column from the SHA256 file # # Read the first column from the SHA256 file
$windows_sha = Get-Content ./artifacts/managarr-windows.sha256 | ForEach-Object { $_.Split(' ')[0] } # $windows_sha = Get-Content ./artifacts/managarr-windows.sha256 | ForEach-Object { $_.Split(' ')[0] }
Add-Content -Path $env:GITHUB_ENV -Value "WINDOWS_SHA=$windows_sha" # Add-Content -Path $env:GITHUB_ENV -Value "WINDOWS_SHA=$windows_sha"
# Read the release version from the release-version file # # Read the release version from the release-version file
$release_version = Get-Content ./artifacts/release-version # $release_version = Get-Content ./artifacts/release-version
Add-Content -Path $env:GITHUB_ENV -Value "RELEASE_VERSION=$release_version" # Add-Content -Path $env:GITHUB_ENV -Value "RELEASE_VERSION=$release_version"
- name: Validate release environment variables # - name: Validate release environment variables
run: | # run: |
echo "Release SHA windows: ${{ env.WINDOWS_SHA }}" # echo "Release SHA windows: ${{ env.WINDOWS_SHA }}"
echo "Release version: ${{ env.RELEASE_VERSION }}" # echo "Release version: ${{ env.RELEASE_VERSION }}"
- name: Package and Publish package to Chocolatey # - name: Package and Publish package to Chocolatey
run: | # run: |
mkdir ./deployment/chocolatey/tools # mkdir ./deployment/chocolatey/tools
# Run packaging script # # 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/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 }} # python "./deployment/chocolatey/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/chocolatey/chocolateyinstall.ps1.template" "./deployment/chocolatey/tools/chocolateyinstall.ps1" ${{ env.WINDOWS_SHA }}
# Publish to Chocolatey # # Publish to Chocolatey
cd ./deployment/chocolatey # cd ./deployment/chocolatey
choco pack # choco pack
echo y | choco install managarr -dv -s . # echo y | choco install managarr -dv -s .
$version = managarr --version # $version = managarr --version
$version = $version -replace " ", "." # $version = $version -replace " ", "."
choco push $version.nupkg -s https://push.chocolatey.org/ --api-key ${{ secrets.CHOCOLATEY_API_KEY }}; # choco push $version.nupkg -s https://push.chocolatey.org/ --api-key ${{ secrets.CHOCOLATEY_API_KEY }};
publish-homebrew-formula: # publish-homebrew-formula:
needs: [publish-github-release] # needs: [publish-github-release]
name: Update Homebrew formulas # name: Update Homebrew formulas
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- name: Checkout repository # - name: Checkout repository
uses: actions/checkout@v4 # uses: actions/checkout@v4
with: # with:
fetch-depth: 1 # fetch-depth: 1
- name: Get release artifacts # - name: Get release artifacts
uses: actions/download-artifact@v3 # uses: actions/download-artifact@v3
with: # with:
name: artifacts # name: artifacts
path: artifacts # path: artifacts
- name: Set release assets and version # - name: Set release assets and version
shell: bash # shell: bash
run: | # run: |
# Set environment variables # # Set environment variables
macos_sha="$(cat ./artifacts/managarr-macos.sha256 | awk '{print $1}')" # macos_sha="$(cat ./artifacts/managarr-macos.sha256 | awk '{print $1}')"
echo "MACOS_SHA=$macos_sha" >> $GITHUB_ENV # echo "MACOS_SHA=$macos_sha" >> $GITHUB_ENV
macos_sha_arm="$(cat ./artifacts/managarr-macos-arm64.sha256 | awk '{print $1}')" # macos_sha_arm="$(cat ./artifacts/managarr-macos-arm64.sha256 | awk '{print $1}')"
echo "MACOS_SHA_ARM=$macos_sha_arm" >> $GITHUB_ENV # echo "MACOS_SHA_ARM=$macos_sha_arm" >> $GITHUB_ENV
linux_sha="$(cat ./artifacts/managarr-linux-musl.sha256 | awk '{print $1}')" # linux_sha="$(cat ./artifacts/managarr-linux-musl.sha256 | awk '{print $1}')"
echo "LINUX_SHA=$linux_sha" >> $GITHUB_ENV # echo "LINUX_SHA=$linux_sha" >> $GITHUB_ENV
release_version="$(cat ./artifacts/release-version)" # release_version="$(cat ./artifacts/release-version)"
echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV # echo "RELEASE_VERSION=$release_version" >> $GITHUB_ENV
- name: Validate release environment variables # - name: Validate release environment variables
run: | # run: |
echo "Release SHA macos: ${{ env.MACOS_SHA }}" # echo "Release SHA macos: ${{ env.MACOS_SHA }}"
echo "Release SHA macos-arm: ${{ env.MACOS_SHA_ARM }}" # echo "Release SHA macos-arm: ${{ env.MACOS_SHA_ARM }}"
echo "Release SHA linux musl: ${{ env.LINUX_SHA }}" # echo "Release SHA linux musl: ${{ env.LINUX_SHA }}"
echo "Release version: ${{ env.RELEASE_VERSION }}" # echo "Release version: ${{ env.RELEASE_VERSION }}"
- name: Execute Homebrew packaging script # - name: Execute Homebrew packaging script
run: | # run: |
# run packaging script # # 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 }} # 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 # - name: Push changes to Homebrew tap
env: # env:
TOKEN: ${{ secrets.MANAGARR_GITHUB_TOKEN }} # TOKEN: ${{ secrets.MANAGARR_GITHUB_TOKEN }}
run: | # run: |
# push to Git # # push to Git
git config --global user.name "Dark-Alex-17" # git config --global user.name "Dark-Alex-17"
git config --global user.email "alex.j.tusa@gmail.com" # 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 # git clone https://Dark-Alex-17:${{ secrets.MANAGARR_GITHUB_TOKEN }}@github.com/Dark-Alex-17/homebrew-managarr.git
rm homebrew-managarr/Formula/managarr.rb # rm homebrew-managarr/Formula/managarr.rb
cp managarr.rb homebrew-managarr/Formula # cp managarr.rb homebrew-managarr/Formula
cd homebrew-managarr # cd homebrew-managarr
git add . # git add .
git diff-index --quiet HEAD || git commit -am "Update formula for Managarr release ${{ env.RELEASE_VERSION }}" # 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 # git push https://$TOKEN@github.com/Dark-Alex-17/homebrew-managarr.git
publish-docker-image: # publish-docker-image:
needs: [publish-github-release] # needs: [publish-github-release]
name: Publishing Docker image to Docker Hub # name: Publishing Docker image to Docker Hub
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- name: Checkout repository # - name: Checkout repository
uses: actions/checkout@v4 # uses: actions/checkout@v4
with: # with:
fetch-depth: 1 # fetch-depth: 1
- name: Get release artifacts # - name: Get release artifacts
uses: actions/download-artifact@v3 # uses: actions/download-artifact@v3
with: # with:
name: artifacts # name: artifacts
path: artifacts # path: artifacts
- name: Set version variable # - name: Set version variable
run: | # run: |
version="$(cat artifacts/release-version)" # version="$(cat artifacts/release-version)"
echo "version=$version" >> $GITHUB_ENV # echo "version=$version" >> $GITHUB_ENV
- name: Validate release environment variables # - name: Validate release environment variables
run: | # run: |
echo "Release version: ${{ env.version }}" # echo "Release version: ${{ env.version }}"
- name: Set up QEMU # - name: Set up QEMU
uses: docker/setup-qemu-action@v3 # uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx # - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 # uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub # - name: Login to Docker Hub
uses: docker/login-action@v3 # uses: docker/login-action@v3
with: # with:
username: ${{ secrets.DOCKER_USERNAME }} # username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} # password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub # - name: Push to Docker Hub
uses: docker/build-push-action@v5 # uses: docker/build-push-action@v5
with: # with:
context: . # context: .
file: Dockerfile # file: Dockerfile
platforms: linux/amd64,linux/arm64 # platforms: linux/amd64,linux/arm64
push: true # push: true
tags: darkalex17/testing:latest, darkalex17/testing:${{ env.version }} # tags: darkalex17/testing:latest, darkalex17/testing:${{ env.version }}
publish-crate: # publish-crate:
needs: publish-github-release # needs: publish-github-release
name: Publish Crate # name: Publish Crate
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- name: Check if actor is repository owner # - name: Check if actor is repository owner
if: ${{ github.actor != github.repository_owner }} # if: ${{ github.actor != github.repository_owner }}
run: | # run: |
echo "You are not authorized to run this workflow." # echo "You are not authorized to run this workflow."
exit 1 # exit 1
- name: Checkout # - name: Checkout
uses: actions/checkout@v4 # uses: actions/checkout@v4
with: # with:
fetch-depth: 0 # fetch-depth: 0
- name: Ensure repository is up-to-date # - name: Ensure repository is up-to-date
run: | # run: |
git fetch --all # git fetch --all
git pull # git pull
- uses: actions/cache@v3 # - uses: actions/cache@v3
name: Cache Cargo registry # name: Cache Cargo registry
with: # with:
path: ~/.cargo/registry # path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }} # key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
- uses: actions/cache@v3 # - uses: actions/cache@v3
with: # with:
path: ~/.cargo/bin # path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('.github/workflows/release.yml') }} # key: ${{ runner.os }}-cargo-bin-${{ hashFiles('.github/workflows/release.yml') }}
- name: Install Rust stable # - name: Install Rust stable
uses: dtolnay/rust-toolchain@stable # uses: dtolnay/rust-toolchain@stable
- uses: katyo/publish-crates@v2 # - uses: katyo/publish-crates@v2
with: # with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} # registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
-63
View File
@@ -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/), 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). 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) ## v0.4.1 (2024-12-14)
### Feat ### Feat
Generated
+1 -1
View File
@@ -1316,7 +1316,7 @@ dependencies = [
[[package]] [[package]]
name = "managarr" name = "managarr"
version = "0.4.2" version = "0.4.1"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"assert_cmd", "assert_cmd",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "managarr" name = "managarr"
version = "0.4.2" version = "0.4.1"
authors = ["Alex Clarke <alex.j.tusa@gmail.com>"] authors = ["Alex Clarke <alex.j.tusa@gmail.com>"]
description = "A TUI and CLI to manage your Servarrs" description = "A TUI and CLI to manage your Servarrs"
keywords = ["managarr", "ratatui", "dashboard", "servarr", "tui"] keywords = ["managarr", "ratatui", "dashboard", "servarr", "tui"]