Skip to content

Commit

Permalink
fix: attempt to repair release process
Browse files Browse the repository at this point in the history
  • Loading branch information
PROJECT-DEFIANT committed Aug 4, 2024
1 parent 222342a commit ae8de2c
Showing 1 changed file with 35 additions and 28 deletions.
63 changes: 35 additions & 28 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,30 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false

- name: Python Semantic Release
id: semrelease
# v9.6.0 is required due to the python v3.12 in the newer version of semantic release action which
# breaks the poetry build command.
uses: python-semantic-release/python-semantic-release@v9.6.0
with:
github_token: ${{ steps.trigger-token.outputs.token }}

- name: Publish package to GitHub Release
uses: python-semantic-release/upload-to-gh-release@main
if: ${{ steps.semrelease.outputs.released }} == 'true'
with:
# NOTE: allow to start the workflow when push action on tag gets executed
# requires using GH_APP to authenitcate, otherwise push authorised with
# the GITHUB_TOKEN does not trigger the tag artifact workflow.
# see https://github.com/actions/create-github-app-token
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.semrelease.outputs.tag }}

- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
# - name: Python Semantic Release
# id: semrelease
# # v9.6.0 is required due to the python v3.12 in the newer version of semantic release action which
# # breaks the poetry build command.
# uses: python-semantic-release/python-semantic-release@v9.6.0
# with:
# github_token: ${{ steps.trigger-token.outputs.token }}
#
# - name: Publish package to GitHub Release
# uses: python-semantic-release/upload-to-gh-release@main
# if: ${{ steps.semrelease.outputs.released }} == 'true'
# with:
# # NOTE: allow to start the workflow when push action on tag gets executed
# # requires using GH_APP to authenitcate, otherwise push authorised with
# # the GITHUB_TOKEN does not trigger the tag artifact workflow.
# # see https://github.com/actions/create-github-app-token
# github_token: ${{ secrets.GITHUB_TOKEN }}
# tag: ${{ steps.semrelease.outputs.tag }}
#
# - name: Store the distribution packages
# uses: actions/upload-artifact@v4
# with:
# name: python-package-distributions
# path: dist/

publish-to-pypi:
needs: release
Expand All @@ -73,11 +73,18 @@ jobs:
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
name: python-package-distributions
path: dist/
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: checkout on v1.7.0
uses: actions/checkout@v4
with:
ref: v1.7.0
- name: build
run: poetry build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

Expand Down

0 comments on commit ae8de2c

Please sign in to comment.