Skip to content

Commit

Permalink
Add release job (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek committed Jul 27, 2022
1 parent 6025d91 commit b68e3df
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,49 @@
name: publish

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
build:
name: Build a pure Python wheel and source distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install build dependencies
run: python -m pip install --upgrade build

- name: Build
run: python -m build

- uses: actions/upload-artifact@v3
with:
name: artifacts
path: dist/*
if-no-files-found: error

publish:
name: Publish release
runs-on: ubuntu-latest
needs:
- build

steps:
- uses: actions/download-artifact@v3
with:
name: artifacts
path: dist

- name: Push build artifacts to PyPI
uses: pypa/gh-action-pypi-publish@v1.5.0
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit b68e3df

Please sign in to comment.