Update release file

This commit is contained in:
Lucas de Sousa Rosa 2023-12-01 17:16:26 -03:00
parent 6678ffa515
commit cd1c306b38
3 changed files with 34 additions and 45 deletions

View File

@ -1,17 +0,0 @@
name: Build and deploy with poetry
on:
release:
types: [published]
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and publish to PyPI
uses: JRubics/poetry-publish@v1.17
with:
repository_name: "test-pypi"
repository_url: "https://test.pypi.org/legacy/"
pypi_token: ${{ secrets.PYPI_TOKEN }}
ignore_dev_requirements: "yes"

View File

@ -0,0 +1,34 @@
name: Create and publish a release
on:
push:
tags:
- 'v*.*.*'
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: ncipollo/release-action@v1
with:
name: Release ${{ github.ref }}
makeLatest: true
publish_to_pypi:
name: Publish to PyPI
needs: create_release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and publish to PyPI
uses: JRubics/poetry-publish@v1.17
with:
repository_name: "test-pypi"
repository_url: "https://test.pypi.org/legacy/"
pypi_token: ${{ secrets.PYPI_TOKEN }}
ignore_dev_requirements: "yes"

View File

@ -1,28 +0,0 @@
on:
push:
tags:
- 'v*.*.*'
name: Create releases on tag push
permissions: write-all
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