Skip to content

Commit

Permalink
add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
girtsf committed Apr 16, 2024
1 parent e910d18 commit 1c39c82
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
release:
types:
- published

jobs:
release_to_pypi:
name: Release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/flyweb-framework/
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Search and replace version
run: |
VERSION="${TAG_NAME//v/}"
sed -i "s/^version = .*placeholder.*$/version = \"$VERSION\"/" pyproject.toml
head pyproject.toml
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- uses: eifinger/setup-rye@v2
- name: Pin python-version
run: rye pin 3.10
- name: Build
run: rye build
# - name: Publish
# uses: pypa/gh-action-pypi-publish@release/v1.8
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "flyweb-framework"
version = "0.3.2"
# Updated by CI when publishing.
version = "0.4+placeholder.0"
description = "Immediate-mode web framework"
authors = [
{ name = "Girts Folkmanis", email = "[email protected]" }
Expand Down

0 comments on commit 1c39c82

Please sign in to comment.