-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
formula: | ||
name: Update Homebrew formula | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Update the Homebrew formula with latest release | ||
uses: NSHipster/update-homebrew-formula-action@main | ||
with: | ||
repository: opencreek/creekey-cli | ||
tap: opencreek/homebrew-tab | ||
formula: creekey.rb | ||
env: | ||
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | ||
|
||
bottle_macos_catalina: | ||
name: Build and distribute Homebrew bottle for macOS Catalina | ||
runs-on: macos-10.15 | ||
needs: [formula] | ||
steps: | ||
- name: Build a bottle using Homebrew | ||
run: | | ||
brew tap opecreek/tab | ||
brew install --build-bottle --verbose creekey | ||
brew bottle creekey | ||
- name: Upload the bottle to the GitHub release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./creekey--${{ github.event.release.tag_name }}.catalina.bottle.1.tar.gz | ||
asset_name: creekey-${{ github.event.release.tag_name }}.catalina.bottle.1.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
bottle_macos_big_sur: | ||
name: Build and distribute Homebrew bottle for macOS Big Sur | ||
runs-on: macos-11.0 | ||
needs: [formula] | ||
steps: | ||
- name: Build a bottle using Homebrew | ||
run: | | ||
brew tap opencreek/tab | ||
brew install --build-bottle --verbose creekey | ||
brew bottle creekey | ||
- name: Upload the bottle to the GitHub release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./creekey--${{ github.event.release.tag_name }}.big_sur.bottle.1.tar.gz | ||
asset_name: creekey-${{ github.event.release.tag_name }}.big_sur.bottle.1.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
update_formula_bottle: | ||
name: Update the Homebrew formula again with bottle | ||
runs-on: ubuntu-latest | ||
needs: | ||
- bottle_macos_catalina | ||
- bottle_macos_big_sur | ||
steps: | ||
- uses: NSHipster/update-homebrew-formula-action@main | ||
with: | ||
repository: opencreek/creekey-cli | ||
tap: opencreek/homebrew-tab | ||
formula: creekey.rb | ||
message: | | ||
Add bottles for creekey ${{ github.event.release.tag_name }} | ||
on macOS 10.15 (Catalina) and macOS 11.0 (Big Sur) | ||
env: | ||
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | ||
|