From 7718856ed5823b68129e28839b174b60d75239a3 Mon Sep 17 00:00:00 2001 From: "Madson Luiz Dantas Dias (UFC)" Date: Mon, 18 Mar 2024 19:03:30 -0300 Subject: [PATCH] fix: fix release and publish scripts. --- .github/workflows/publish.yml | 28 +++++++++------------------- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1bd76c8..e401314 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,24 +1,14 @@ -name: Semantic Release - +name: Python package on: push: - branches: - - master - + tags: + - "v*.*.*" jobs: - release: + build: runs-on: ubuntu-latest - concurrency: release - permissions: - id-token: write - contents: write - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Python Semantic Release - uses: python-semantic-release/python-semantic-release@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v3 + - name: Build and publish to pypi + uses: JRubics/poetry-publish@v2.0 + with: + pypi_token: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1bd76c8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Semantic Release + +on: + push: + branches: + - master + +jobs: + release: + runs-on: ubuntu-latest + concurrency: release + permissions: + id-token: write + contents: write + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Python Semantic Release + uses: python-semantic-release/python-semantic-release@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }}