2020-12-30 21:33:17 +01:00
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [created]
|
|
|
|
|
2020-12-30 23:56:10 +01:00
|
|
|
name: Create new formula version
|
2020-12-30 21:33:17 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
upload-release:
|
|
|
|
name: Upload Release Asset
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-12-30 23:56:10 +01:00
|
|
|
- name: Checkout formula repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: ${{ github.repository_owner }}/homebrew-makecolors
|
|
|
|
token: ${{ secrets.PUBLISH_FORMULA_TOKEN }}
|
|
|
|
- name: Update formula
|
2020-12-30 21:39:19 +01:00
|
|
|
run: |
|
2020-12-30 23:56:10 +01:00
|
|
|
cat << EOF > Formula/make-colors.rb
|
|
|
|
class MakeColors < Formula
|
|
|
|
desc "Converts a simple list of color definitions to asset catalogs for Xcode and resource XML for Android"
|
|
|
|
homepage "https://github.com/${{ github.repository }}"
|
|
|
|
url "https://github.com/${{ github.repository }}.git", :tag => "${{ github.event.release.tag_name }}", :revision => "${{ github.sha }}"
|
|
|
|
head "https://github.com/${{ github.repository }}.git"
|
|
|
|
license "MIT"
|
2020-12-30 21:33:17 +01:00
|
|
|
|
2020-12-30 23:56:10 +01:00
|
|
|
depends_on :xcode => ["12.0", :build]
|
2020-12-30 21:33:17 +01:00
|
|
|
|
2020-12-30 23:56:10 +01:00
|
|
|
def install
|
|
|
|
system "make", "install", "prefix=#{prefix}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
EOF
|
2020-12-30 21:33:17 +01:00
|
|
|
|
2020-12-30 23:56:10 +01:00
|
|
|
git add Formula/make-colors.rb
|
|
|
|
git commit -m "Update formula for ${{ github.event.release.tag_name }}"
|
|
|
|
git push
|