Skip to content

Commit

Permalink
Merge pull request #16 from samueljsb/build-publish-workflow
Browse files Browse the repository at this point in the history
Add a workflow to build and publish the package
  • Loading branch information
samueljsb committed May 8, 2024
2 parents 2a4c4b3 + 82f8c2d commit 2c20510
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build_publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and publish

on:
pull_request:
push:
tags:
- v*

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
- uses: hynek/build-and-inspect-python-package@v2

publish:
runs-on: ubuntu-latest
timeout-minutes: 5

needs: [build]
if: github.repository_owner == 'samueljsb' && github.ref_type == 'tag'

environment: publish
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ classifiers =
Programming Language :: Python :: Implementation :: CPython

[options]
packages =
find:
install_requires =
attrs
tokenize-rt
Expand Down

0 comments on commit 2c20510

Please sign in to comment.