Skip to content

Commit ac3c176

Browse files
authored
release: stapi-pydantic v0.0.1 (#14)
1 parent d4ff909 commit ac3c176

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

.github/workflows/pypi.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- */v*
7+
8+
jobs:
9+
repo_name:
10+
name: Get repo name
11+
runs-on: ubuntu-latest
12+
outputs:
13+
repo_name: ${{ steps.split.outputs.repo_name }}
14+
steps:
15+
- name: Get repo name
16+
# https://stackoverflow.com/questions/73402042/github-action-expressions-split-string
17+
env:
18+
TAG: ${{ github.ref_name }}
19+
id: split
20+
run: echo "repo_name=${TAG%%/*}"
21+
release:
22+
name: Release ${{ needs.repo_name.outputs.repo_name }}
23+
runs-on: ubuntu-latest
24+
needs: repo_name
25+
environment:
26+
name: pypi
27+
url: https://pypi.org/p/${{ needs.repo_name.outputs.repo_name }}
28+
permissions:
29+
id-token: write
30+
if: ${{ github.repository }} == 'stapi-spec/pystapi'
31+
defaults:
32+
run:
33+
working-directory: ${{ needs.repo_name.outputs.repo_name }}
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: astral-sh/setup-uv@v5
37+
- name: Install build
38+
run: uv pip install build
39+
- name: Build
40+
run: uv run python -m build
41+
- uses: pypa/gh-action-pypi-publish@release/v1

RELEASING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Releasing
2+
3+
1. Determine which package you're releasing
4+
2. Determine the next version, following [semantic versioning](https://semver.org/)
5+
3. Create a release branch: `git checkout -b release/{package}-v{version}`
6+
4. Update that package's CHANGELOG with:
7+
- A new header with the new version
8+
- A new link at the bottom of the CHANGELOG for that header
9+
5. `git push -u origin`
10+
6. Once approved, merge the PR
11+
7. `git checkout main && git pull && git tag {package}/v{version} && git push {package}/v{version}`
12+
8. Github actions will automatically publish the release on tag push
13+
9. Create a new [release](https://github.com/stapi-spec/pystapi/releases) pointing to the new tag
14+
15+
> [!NOTE]
16+
> The tag format (`{package}/v{version}`) is very important, because that's how we discover which package to build and publish.

stapi-pydantic/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
9+
## [0.0.1] - 2025-04-01
10+
11+
Initial release.
12+
13+
[0.0.1]: https://github.com/stapi-spec/pystapi/releases/tag/v0.0.1

0 commit comments

Comments
 (0)