MakeColors/.github/workflows/release.yml

41 lines
1.4 KiB
YAML
Raw Normal View History

2020-12-30 21:33:17 +01:00
on:
release:
types: [created]
name: Create new formula version
2020-12-30 21:33:17 +01:00
jobs:
upload-release:
2020-12-31 00:09:39 +01:00
name: Create new formula version
2020-12-30 21:33:17 +01:00
runs-on: ubuntu-latest
steps:
- 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: |
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
depends_on :xcode => ["12.0", :build]
2020-12-30 21:33:17 +01:00
def install
system "make", "install", "prefix=#{prefix}"
end
end
EOF
2020-12-30 21:33:17 +01:00
2020-12-31 00:09:39 +01:00
git config user.name github-actions
git config user.email github-actions@github.com
git add Formula/make-colors.rb
git commit -m "Update formula for ${{ github.event.release.tag_name }}"
git push