Skip to content

Commit

Permalink
publish to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlambson committed Aug 21, 2024
1 parent b4d905e commit 52ed83f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/actions/setup-python/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ runs:
echo "cache-name=$cache_name" >>$GITHUB_OUTPUT
shell: bash

- if: ${{ 'inputs.extra-cache' != '' }}
- if: ${{ inputs.extra-cache != '' }}
name: extra-cache
uses: actions/cache@v4
with:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: publish

on:
release:
types: [published]
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: ./.github/actions/setup-python
- name: build
run: uvx --from build pyproject-build --installer uv
working-directory: bored-charts
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: bored-charts/dist

publish:
if: github.event_name == 'release'
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: ./.github/actions/setup-python
- uses: actions/download-artifact@v4
- name: publish
run: uvx twine upload dist/*
working-directory: bored-charts

0 comments on commit 52ed83f

Please sign in to comment.