This commit is contained in:
Matt Troutman 2024-05-19 22:04:36 -05:00
parent 52ac1f4efb
commit dc4c45bf6c
Signed by: trtmn
SSH Key Fingerprint: SHA256:cgYdsbnbA0S6X4anVowEAntjEpGV7nMyk2NW6ZYoNjE
2 changed files with 0 additions and 69 deletions

View File

@ -1,18 +0,0 @@
name: Dispatch new release
on:
release:
types: [published]
jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.PAT }}
repository: trtmn/homebrew-trtmn
event-type: new_release
client-payload: '{"version": "${{ github.event.release.tag_name }}"}'

View File

@ -1,51 +0,0 @@
name: Create Release
on:
push:
branches:
- main # or the name of your default branch
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create tag
id: create_tag
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { sha } = context
const tag = `release-${sha.substring(0, 7)}`
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${tag}`,
sha: sha
})
return tag
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.create_tag.outputs.result }}
release_name: Release ${{ steps.create_tag.outputs.result }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/your-asset.zip # replace with the path to your asset
asset_name: your-asset.zip # replace with the name of your asset
asset_content_type: application/zip