Skip to content

Commit

Permalink
Adds a GitHub workflow to publish the package
Browse files Browse the repository at this point in the history
  • Loading branch information
funkyfuture committed Oct 16, 2024
1 parent f177bf0 commit a970fdc
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---

name: Publish cff-from-621
on:
push:
tags: ["*"]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: hynek/build-and-inspect-python-package@v2

pypi:
name: Publish to the cheeseshop
needs: ["build", "qa"]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/cff-from-621
permissions:
id-token: write

steps:
- name: Download package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

qa:
uses: ./.github/workflows/qu.yml
with:
ref: ${{ github.ref }}

...
6 changes: 2 additions & 4 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ mypy:
python -m mypy {{python_src}}

# creates and publishes a release
release: tests build
twine check {{build_dir}}/*
release: tests
git tag {{version}}
git push upstream main
git push upstream main:main
git push upstream {{version}}
twine upload {{build_dir}}/*

# runs all tests
tests: lint mypy integration-tests

0 comments on commit a970fdc

Please sign in to comment.