mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-07 03:55:22 +00:00
Add GH actions to create releases when tags are pushed and deploy when released.
This commit is contained in:
parent
ef7583a8dd
commit
14b3e7fb96
35
.github/workflows/pypi-publish.yml
vendored
35
.github/workflows/pypi-publish.yml
vendored
@ -1,28 +1,17 @@
|
|||||||
name: Deploy to PyPI
|
name: Build and deploy with poetry
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [created]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
build_and_publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
POETRY_VIRTUALENVS_CREATE: "false"
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install poetry with bumpversion plugin
|
- name: Build and publish to PyPI
|
||||||
run: |
|
uses: JRubics/poetry-publish@v1.17
|
||||||
pipx install poetry
|
with:
|
||||||
pipx inject poetry poetry-bumpversion
|
repository_name: "test-pypi"
|
||||||
|
repository_url: "https://test.pypi.org/legacy/"
|
||||||
- name: Build the package and bump version
|
pypi_token: ${{ secrets.PYPI_TOKEN }}
|
||||||
run: |
|
ignore_dev_requirements: "yes"
|
||||||
poetry version ${{ github.ref_name }}
|
|
||||||
poetry build
|
|
||||||
|
|
||||||
- name: Publish to PyPI
|
|
||||||
run: |
|
|
||||||
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
|
|
||||||
poetry publish --repository test-pypi
|
|
26
.github/workflows/tag-to-release.yml
vendored
Normal file
26
.github/workflows/tag-to-release.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*.*.*'
|
||||||
|
|
||||||
|
name: Create releases on tag push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Create release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Create release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: Release ${{ github.ref }}
|
||||||
|
body: |
|
||||||
|
This is an automated release.
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
Loading…
x
Reference in New Issue
Block a user