-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #203 from authzed/get-automatic-version-bumping-wo…
…rking Get automatic version bumping working
- Loading branch information
Showing
4 changed files
with
19 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,13 +22,6 @@ jobs: | |
UPDATED_STATUS: "${{ steps.buf-update.outputs.updated }}" | ||
run: | | ||
echo "Update status: $UPDATED_STATUS" | ||
- name: "Update package version" | ||
uses: "authzed/actions/semver-update@main" | ||
if: "steps.buf-update.outputs.updated == 'true'" | ||
with: | ||
sourcefile-path: "pyproject.toml" | ||
version-regex: 'name = "authzed"\nversion = "(.+)"' | ||
version-change: "minor" | ||
- name: "Install buf" | ||
uses: "bufbuild/[email protected]" | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,13 +26,6 @@ jobs: | |
UPDATED_STATUS: "${{ steps.buf-update.outputs.updated }}" | ||
run: | | ||
echo "Update status: $UPDATED_STATUS" | ||
- name: "Update package version" | ||
uses: "authzed/actions/semver-update@main" | ||
if: "steps.buf-update.outputs.updated == 'true'" | ||
with: | ||
sourcefile-path: "pyproject.toml" | ||
version-regex: 'name = "authzed"\nversion = "(.+)"' | ||
version-change: "minor" | ||
- name: "Install buf" | ||
uses: "bufbuild/[email protected]" | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
--- | ||
name: "Publish to PyPI" | ||
on: "push" | ||
on: | ||
release: | ||
types: | ||
- "published" | ||
jobs: | ||
publish: | ||
name: "Build & Publish" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: "actions/checkout@v4" | ||
- name: "Install Poetry" | ||
uses: "snok/install-poetry@v1" | ||
- uses: "actions/setup-python@v5" | ||
with: | ||
python-version: "3.11" | ||
- name: "Install pypa/build" | ||
run: "python -m pip install build --user" | ||
cache: 'poetry' | ||
# This gives us a version number without the release prefix | ||
- name: "Write release version" | ||
run: | | ||
VERSION=${GITHUB_REF_NAME#v} | ||
echo Version: $VERSION | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: "Set the release number in pyproject.toml" | ||
run: "poetry version -s $VERSION" | ||
- name: "Build wheel and source tarball" | ||
run: "python -m build --sdist --wheel --outdir dist/ ." | ||
run: "poetry build" | ||
- name: "Publish" | ||
if: "startsWith(github.ref, 'refs/tags')" | ||
uses: "pypa/gh-action-pypi-publish@release/v1" | ||
with: | ||
password: "${{ secrets.PYPI_API_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,10 @@ | |
authors = ["Authzed <[email protected]>"] | ||
description = "Client library for SpiceDB." | ||
|
||
# NOTE: These two lines must be kept together for the API update action to function | ||
name = "authzed" | ||
version = "0.18.1" | ||
# The version is set at publish time with a call to `poetry version -s <tag>`, | ||
# where the tag comes from the release. | ||
version = "0.0.0" | ||
packages = [ | ||
{include = "authzed"}, | ||
{include = "validate"}, | ||
|