🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.3 KiB

  1. name: deploy
  2. on:
  3. release:
  4. types: published
  5. jobs:
  6. homebrew-entt:
  7. timeout-minutes: 5
  8. runs-on: ubuntu-latest
  9. env:
  10. GH_REPO: homebrew-entt
  11. FORMULA: entt.rb
  12. steps:
  13. - uses: actions/checkout@v2
  14. - name: Clone repository
  15. working-directory: build
  16. env:
  17. PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
  18. run: git clone https://$GITHUB_ACTOR:$PERSONAL_ACCESS_TOKEN@github.com/$GITHUB_ACTOR/$GH_REPO.git
  19. - name: Prepare formula
  20. working-directory: build
  21. run: |
  22. cd $GH_REPO
  23. curl "https://github.com/${{ github.repository }}/archive/${{ github.ref }}.tar.gz" --location --fail --silent --show-error --output archive.tar.gz
  24. sed -i -e '/url/s/".*"/"'$(echo "https://github.com/${{ github.repository }}/archive/${{ github.ref }}.tar.gz" | sed -e 's/[\/&]/\\&/g')'"/' $FORMULA
  25. sed -i -e '/sha256/s/".*"/"'$(openssl sha256 archive.tar.gz | cut -d " " -f 2)'"/' $FORMULA
  26. - name: Update remote
  27. working-directory: build
  28. run: |
  29. cd $GH_REPO
  30. git config --local user.email "action@github.com"
  31. git config --local user.name "$GITHUB_ACTOR"
  32. git add $FORMULA
  33. git commit -m "Update to ${{ github.ref }}"
  34. git push origin master