use PAT to get authorisation to r/w on the brew tap tools repo #5
Workflow file for this run
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
name: Create Release and Brew Formula | |
on: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' # Semantic versioning tags match trigger only | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Prepare Brew Formula | |
run: | | |
mkdir brew-formula | |
cp question.py brew-formula/question | |
tar czf question.tgz -C brew-formula question | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Brew Formula as Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./question.tgz | |
asset_name: question.tgz | |
asset_content_type: application/gzip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |