Skip to content

Commit

Permalink
Attempting to get trusted publishing working
Browse files Browse the repository at this point in the history
  • Loading branch information
ZechCodes committed May 2, 2024
1 parent 5a288b4 commit 6694e11
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 15 deletions.
44 changes: 30 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,35 @@ on:

jobs:
deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

permissions:
# This permission is required for trusted publishing.
id-token: write
contents: read

steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.12"
- name: Install injectors.py
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.in-project true
- name: Build and publish
run: |
poetry publish --build
- uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false

- name: Update version (kept at 0.0.0) in pyproject.toml and build
run: |
poetry version ${{ github.ref_name }}
poetry build
- name: Mint token
id: mint
uses: tschm/[email protected]

- name: Publish the package with poetry
run: |
poetry publish -u __token__ -p '${{ steps.mint.outputs.api-token }}'
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ommi"
version = "0.1.1"
version = "0.1.2"
description = "A portable object model mapper that can work with any database and model library (dataclasses, Attrs, Pydantic, etc.). It is designed for the general case to support the largest possible number of databases."
authors = ["Zech Zimmerman <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 6694e11

Please sign in to comment.