Skip to content

Commit

Permalink
Add PyPI publishing to release workflow (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshalX committed May 17, 2023
1 parent df71a19 commit 9e25efb
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 54 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Black

on: [pull_request, push]
on: [ pull_request, push ]

jobs:
black:
Expand All @@ -19,4 +19,4 @@ jobs:
run: pip install black

- name: Check code style of package.
run: black --check atproto
run: black --check atproto
38 changes: 0 additions & 38 deletions .github/workflows/pypi.yml

This file was deleted.

48 changes: 34 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,38 @@
name: Create Release from the version tag
name: Create and Publish release from the version tag

on:
push:
tags:
- "v*.*.*"
push:
tags:
- "v*.*.*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository.
uses: actions/checkout@v3

- name: Create Release.
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
build:
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- name: Checkout repository.
uses: actions/checkout@v3

- name: Create Release.
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true

- name: Setup Python.
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Setup Poetry.
run: curl -sSL https://install.python-poetry.org | python - -y

- name: Add Poetry to PATH.
run: echo "${HOME}/.poetry/bin" >> $GITHUB_PATH

- name: Build package.
run: poetry build

- name: Publish a Python distribution to PyPI.
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 9e25efb

Please sign in to comment.