-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (38 loc) · 1.32 KB
/
release.yml
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
name: Release
# This is a manual workflow for releasing new version of the package.
#
# It will:
# - Build the distribution
# - Publish it to PyPI
# - Create a new release on GitHub
#
# The version (and tag) of the release is determined by the version in the
# `pyproject.toml` file.
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # Required for making the Release
id-token: write # Required for PyPI Trusted Publishing
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
version: "0.4.x"
- name: Build distribution
run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
verbose: true
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(uv run juv version --output-format=json | jq -r '.version')
uvx --from 'rooster-blue>=0.0.8' --isolated rooster changelog --version=v$VERSION | grep -v '^[Found|Retrieving]' > release-notes.md
uvx --from 'rooster-blue>=0.0.8' --isolated rooster contributors --version=v$VERSION --quiet >> release-notes.md
gh release create v$VERSION --notes-file release-notes.md