Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit 13b6e24

Browse files
Prepare for release on PyPI (#4)
* Prepare for release * Update version * Publish only on tags
1 parent 0871f2a commit 13b6e24

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,33 @@ on:
66
- main
77
tags:
88
- '**'
9-
pull_request:
10-
branches:
11-
- '**'
129

1310
jobs:
1411
packaging:
12+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
1513
name: Distribution
1614
runs-on: ubuntu-latest
15+
16+
permissions:
17+
id-token: write
18+
19+
environment:
20+
name: pypi
21+
url: https://pypi.org/p/betterproto2_compiler
22+
1723
steps:
18-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
25+
1926
- name: Set up Python 3.10
2027
uses: actions/setup-python@v4
2128
with:
2229
python-version: "3.10"
30+
2331
- name: Install poetry
2432
run: python -m pip install poetry
33+
2534
- name: Build package
2635
run: poetry build
27-
- name: Publish package to PyPI
28-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
29-
env:
30-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.pypi }}
31-
run: poetry publish -n
36+
37+
- name: Publish package distributions to PyPI
38+
uses: pypa/gh-action-pypi-publish@release/v1.12

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "betterproto2_compiler"
3-
version = "2.0.0b7"
3+
version = "0.0.2"
44
description = "Compiler for betterproto2"
55
authors = ["Adrien Vannson <[email protected]>", "Daniel G. Taylor <[email protected]>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)