Skip to content

Commit

Permalink
Split build & release further.
Browse files Browse the repository at this point in the history
  • Loading branch information
apollo13 committed Jun 2, 2023
1 parent 6095ad8 commit e378a66
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ jobs:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Check release
id: check_release
run: |
Expand All @@ -136,4 +134,3 @@ jobs:
autopub prepare
autopub build
autopub commit
autopub githubrelease
18 changes: 13 additions & 5 deletions .github/workflows/pypi-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name: Build & upload PyPI package

on:
release:
types:
- published
push:
tags: ["*"]

jobs:
build-package:
Expand All @@ -22,14 +21,18 @@ jobs:

release-pypi:
name: Publish released package to pypi.org
environment: release-pypi # TODO: how to name the env
if: github.event.action == 'published'
environment: Deployment
runs-on: ubuntu-latest
needs: build-package
permissions:
id-token: write
contents: write

steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4

- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v3
with:
Expand All @@ -40,3 +43,8 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/ # TODO: Move over to actual PyPI

- name: Create Github release
run: |
pip install autopub[github]
autopub githubrelease

0 comments on commit e378a66

Please sign in to comment.