Skip to content

Commit

Permalink
chore: publish.yml combined build and release
Browse files Browse the repository at this point in the history
  • Loading branch information
chughes741 committed Jul 17, 2023
1 parent d067996 commit f0f62ba
Showing 1 changed file with 6 additions and 24 deletions.
30 changes: 6 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,31 @@ permissions:
contents: read

jobs:
build:
release:
runs-on: ubuntu-latest
environment: release

permissions:
id-token: write
strategy:
matrix:
python-version: ["3.11"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Build package
run: |
poetry build
- name: Archive build artifact
uses: actions/upload-artifact@v3
with:
name: dist
path: dist

release:
needs: build
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write

steps:
- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: dist
path: ~/

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ~/dist

0 comments on commit f0f62ba

Please sign in to comment.