1
0
mirror of https://github.com/pavlobu/deskreen.git synced 2025-05-27 21:00:08 -07:00

Merge pull request #101 from VergeDX/master

[F] Fix GitHub Actions trigger issues.
This commit is contained in:
Paul Pavlo Buidenkov 2021-02-08 15:47:52 +02:00 committed by GitHub
commit 7f0ca455cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 21 deletions

View File

@ -0,0 +1,28 @@
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#release
on:
release:
types: [released]
name: Update Homebrew cask
jobs:
homebrew-pr:
runs-on: macos-10.15
steps:
- name: Set $VERSION without preifx v
# https://github.community/t/how-to-get-just-the-tag-name/16241
# https://stackoverflow.com/questions/57968497/how-do-i-set-an-env-var-with-a-bash-expression-in-github-actions
run: echo VERSION=$(echo ${GITHUB_REF##*/} | cut -c2-) >> $GITHUB_ENV
- name: Install Homebrew
# Command from https://brew.sh/
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#updating-a-cask
- name: Updating cask Deskreen
run: brew bump-cask-pr --version $VERSION deskreen
env:
# First, create a personal access token: (url from Homebrew's output)
# https://github.com/settings/tokens/new?scopes=gist,public_repo&description=Homebrew
# Then, go repo settings -> Secrets -> New repository secret -> HOMEBREW_GITHUB_API_TOKEN : <secret value>.
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}

View File

@ -116,24 +116,3 @@ jobs:
file: ${{ matrix.artifact_name }}
tags: true
draft: true
homebrew-pr:
runs-on: macos-10.15
steps:
- name: Set $VERSION without preifx v
# https://github.community/t/how-to-get-just-the-tag-name/16241
# https://stackoverflow.com/questions/57968497/how-do-i-set-an-env-var-with-a-bash-expression-in-github-actions
run: echo VERSION=$(echo ${GITHUB_REF##*/} | cut -c2-) >> $GITHUB_ENV
- name: Install Homebrew
# Command from https://brew.sh/
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#updating-a-cask
- name: Updating cask Deskreen
run: brew bump-cask-pr --version $VERSION deskreen
env:
# First, create a personal access token: (url from Homebrew's output)
# https://github.com/settings/tokens/new?scopes=gist,public_repo&description=Homebrew
# Then, go repo settings -> Secrets -> New repository secret -> HOMEBREW_GITHUB_API_TOKEN : <secret value>.
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}