mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-12-28 00:18:14 +00:00
0107ca44d7
Some checks failed
CI / GitHub Env Debug (push) Has been cancelled
CI / Setup Release (push) Has been cancelled
CI / Setup Flatpak Matrix (push) Has been cancelled
CI Docker / Check Dockerfiles (push) Has been cancelled
CodeQL / Get language matrix (push) Has been cancelled
Build GH-Pages / update_pages (push) Has been cancelled
CI / Linux Flatpak (push) Has been cancelled
CI / Linux ${{ matrix.type }} (--appimage-build, 22.04, AppImage) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 13) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 14) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest, true) (push) Has been cancelled
CI / Macports (macOS-${{ matrix.os_version }}) (13, true) (push) Has been cancelled
CI / Macports (macOS-${{ matrix.os_version }}) (14) (push) Has been cancelled
CI / Windows (push) Has been cancelled
CI Docker / Setup Release (push) Has been cancelled
CI Docker / Docker${{ matrix.tag }} (push) Has been cancelled
CodeQL / Analyze (${{ matrix.name }}) (push) Has been cancelled
71 lines
2.3 KiB
YAML
71 lines
2.3 KiB
YAML
---
|
|
# This action is a candidate to centrally manage in https://github.com/<organization>/.github/
|
|
# If more Homebrew applications are developed, consider moving this action to the organization's .github repository,
|
|
# using the `homebrew-pkg` repository label to identify repositories that should trigger this workflow.
|
|
|
|
# Update Homebrew on release events.
|
|
|
|
name: Update Homebrew release
|
|
|
|
on:
|
|
release:
|
|
types: [released]
|
|
|
|
concurrency:
|
|
group: "${{ github.workflow }}-${{ github.event.release.tag_name }}"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
update-homebrew-release:
|
|
if: >-
|
|
github.repository_owner == 'LizardByte'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check if Homebrew repo
|
|
env:
|
|
TOPIC: homebrew-pkg
|
|
id: check-label
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
const topic = process.env.TOPIC;
|
|
console.log(`Checking if repo has topic: ${topic}`);
|
|
|
|
const repoTopics = await github.rest.repos.getAllTopics({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo
|
|
});
|
|
console.log(`Repo topics: ${repoTopics.data.names}`);
|
|
|
|
const hasTopic = repoTopics.data.names.includes(topic);
|
|
console.log(`Has topic: ${hasTopic}`);
|
|
|
|
core.setOutput('hasTopic', hasTopic);
|
|
|
|
- name: Download release asset
|
|
id: download
|
|
if: >-
|
|
steps.check-label.outputs.hasTopic == 'true'
|
|
uses: robinraju/release-downloader@v1.11
|
|
with:
|
|
repository: "${{ github.repository }}"
|
|
tag: "${{ github.event.release.tag_name }}"
|
|
fileName: "*.rb"
|
|
tarBall: false
|
|
zipBall: false
|
|
out-file-path: "release_downloads"
|
|
extract: false
|
|
|
|
- name: Publish Homebrew Formula
|
|
if: >-
|
|
steps.check-label.outputs.hasTopic == 'true' &&
|
|
fromJson(steps.download.outputs.downloaded_files)[0]
|
|
uses: LizardByte/homebrew-release-action@v2024.919.145818
|
|
with:
|
|
formula_file: ${{ fromJson(steps.download.outputs.downloaded_files)[0] }}
|
|
git_email: ${{ secrets.GH_BOT_EMAIL }}
|
|
git_username: ${{ secrets.GH_BOT_NAME }}
|
|
publish: true
|
|
token: ${{ secrets.GH_BOT_TOKEN }}
|
|
validate: false
|