ci: Deleted the test homebrew release workflow and updated the main release workflow to have the homebrew release [skip ci]
This commit is contained in:
@@ -329,6 +329,62 @@ jobs:
|
|||||||
$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:
|
||||||
|
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@v4.1.7
|
||||||
|
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: 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: 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:
|
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
|
||||||
|
|||||||
@@ -1,65 +0,0 @@
|
|||||||
name: Test release Managarr to Homebrew
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-homebrew-formula:
|
|
||||||
name: Update Homebrew formulas
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 1
|
|
||||||
|
|
||||||
- name: Set release assets and version
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
# mock release artifacts
|
|
||||||
mkdir artifacts
|
|
||||||
echo 'ca55feb77e2bc0e03a2344e75c67fbfa14b7d3dc8e80a0ccfb1e0fea263ce4ed managarr-macos.tar.gz' > artifacts/managarr-macos.sha256
|
|
||||||
echo '754623934d5f6ffb631f3cc41c4aed29ce6a6c323f7f4022befab806ff4cbe4c managarr-macos-arm64.tar.gz' > artifacts/managarr-macos-arm64.sha256
|
|
||||||
echo '45cf1e06daf56bfc055876b51bd837716b2ea788898b5accc2f6847af4275011 managarr-linux-musl.tar.gz' > artifacts/managarr-linux-musl.sha256
|
|
||||||
echo '0.4.1' > artifacts/release-version
|
|
||||||
|
|
||||||
# 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: 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
|
|
||||||
Reference in New Issue
Block a user