diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml deleted file mode 100644 index 1993082..0000000 --- a/.github/workflows/publish.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: publish - -on: - release: - types: [published] - -permissions: - contents: read - -jobs: - publish: - runs-on: ubuntu-latest - - permissions: - contents: write - - id-token: write - - environment: - name: pypi - url: https://pypi.org/p/odoo-addons-path - - steps: - - name: Check out at new tag - uses: actions/checkout@v4 - with: - ref: ${{ github.event.release.tag_name }} - - - name: Set up the environment - uses: ./.github/actions/setup-python-env - - - name: Build Package - run: make build - - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@v1.13.0 - with: - packages-dir: dist diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 83e2283..53f25a2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,6 +15,11 @@ jobs: permissions: contents: write + id-token: write + + environment: + name: pypi + url: https://pypi.org/p/odoo-addons-path steps: @@ -34,3 +39,23 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} git_committer_name: "github-actions" git_committer_email: "actions@users.noreply.github.com" + + - name: Checkout at release tag + if: steps.release.outputs.released == 'true' + uses: actions/checkout@v4 + with: + ref: ${{ steps.release.outputs.tag }} + + - name: Set up the environment + if: steps.release.outputs.released == 'true' + uses: ./.github/actions/setup-python-env + + - name: Build Package + if: steps.release.outputs.released == 'true' + run: make build + + - name: Publish package distributions to PyPI + if: steps.release.outputs.released == 'true' + uses: pypa/gh-action-pypi-publish@v1.13.0 + with: + packages-dir: dist diff --git a/uv.lock b/uv.lock index 57154b0..89f028c 100644 --- a/uv.lock +++ b/uv.lock @@ -130,7 +130,7 @@ wheels = [ [[package]] name = "odoo-addons-path" -version = "1.0.0" +version = "1.0.1" source = { editable = "." } dependencies = [ { name = "pyyaml" },