-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (37 loc) · 1.15 KB
/
release.yml
File metadata and controls
46 lines (37 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Release to PyPI
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Build package
run: uv build
- name: Publish to PyPI
run: uv publish dist/*
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/*
generate_release_notes: true
- name: Update Homebrew Formula
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
run: |
TAG="${GITHUB_REF#refs/tags/v}"
SHA=$(shasum -a 256 dist/mrstack-${TAG}.tar.gz | cut -d' ' -f1)
curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GH_TOKEN}" \
https://api.github.com/repos/thestack-ai/homebrew-mrstack/dispatches \
-d "{\"event_type\":\"update-formula\",\"client_payload\":{\"tag\":\"${TAG}\",\"sha256\":\"${SHA}\"}}"