Skip to content

ci: use another action #17

ci: use another action

ci: use another action #17

Workflow file for this run

name: Pythonseer build and publish via label
on:
push:
branches:
- main
jobs:
build-n-publish:
name: Pythonseer build and publish
runs-on: ubuntu-latest
steps:
- name: "✔️ Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "📣 Release on push"
id: release
uses: rymndhng/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
bump_version_scheme: norelease
use_github_release_notes: true
- name: "✏️ Generate release changelog"
if: ${{ steps.release.outputs.version != '' }}
uses: heinrichreimer/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: "💾 Commit new version"
if: ${{ steps.release.outputs.version != '' }}
run: |
sed -i 's/^version = ".*"/version = "${{ steps.release.outputs.version }}"/g' ./pyproject.toml
git config user.email [email protected]
git config user.name github-actions
git commit -am 'version incremented'
git push
- name: "🐍 Set up Python 3.10"
if: ${{ steps.release.outputs.version != '' }}
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: "🛠 Install pypa/build"
if: ${{ steps.release.outputs.version != '' }}
run: >-
python -m
pip install
build
--user
- name: "🔧 Build a binary wheel and a source tarball"
if: ${{ steps.release.outputs.version != '' }}
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: "📦 Publish distribution to PyPI"
if: ${{ steps.release.outputs.version != '' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: "🤖 Announce on lemmy.dbzer0.com"
if: ${{ steps.release.outputs.version != '' }}
run: |
python -m pip install pythorhead
python .github/workflows/publish_on_lemmy.py ${{ steps.release.outputs.version }}
env:
LEMMY_BOT_PASSWORD: ${{ secrets.LEMMY_BOT_PASSWORD }}