Skip to content

Commit

Permalink
ci(release): Rework workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisklein committed Nov 21, 2023
1 parent 361d195 commit 814ee4a
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/build.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
name: build
name: release

on:
push:
tags:
- "v*.*.*"
branches:
- main
pull_request:
branches:
- main

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

jobs:
pure-python:
name: Build a pure Python wheel and sdist
build:
name: Build wheel and sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -36,14 +31,12 @@ jobs:
path: dist/*
if-no-files-found: error

pypi-publish:
publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
needs: pure-python
environment:
name: pypi-publish
url: https://pypi.org/p/py-ina238
permissions:
id-token: write
steps:
Expand All @@ -53,5 +46,3 @@ jobs:
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true

0 comments on commit 814ee4a

Please sign in to comment.