Updates
This commit is contained in:
parent
52ac1f4efb
commit
dc4c45bf6c
18
.github/workflows/dispatch.yml
vendored
18
.github/workflows/dispatch.yml
vendored
|
@ -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 }}"}'
|
51
.github/workflows/release.yml
vendored
51
.github/workflows/release.yml
vendored
|
@ -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
|
Loading…
Reference in New Issue
Block a user