diff --git a/.github/workflows/build_and_package.yml b/.github/workflows/build_and_package.yml index ce5893b9..500cb79c 100644 --- a/.github/workflows/build_and_package.yml +++ b/.github/workflows/build_and_package.yml @@ -14,7 +14,7 @@ on: env: MAIN_PYTHON_VERSION: "3.11" POETRY_VERSION: "2.3.2" - PACKAGE_NAME: "VISOR" + PACKAGE_NAME: "ansys-visor-viewer" # For Solutions private PyPI: POETRY_HTTP_BASIC_SOLUTIONS_PRIVATE_PYPI_USERNAME: "PAT" @@ -215,20 +215,43 @@ jobs: - name: Upload Python package uses: actions/upload-artifact@v4 with: - name: visor - path: dist/*.whl + name: ${{ env.PACKAGE_NAME }}-artifacts + path: dist/ - - name: "Upload artifacts to PyPI" - if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) - uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1 + outputs: + package_version: ${{ steps.set_package_version.outputs.package_version }} + + release: + name: Release project + if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }} + needs: [build] + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write # required for release to github + contents: write # required to create releases + steps: + - name: "Download the library artifacts from build-library step" + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: ${{ env.PACKAGE_NAME }}-artifacts + path: ${{ env.PACKAGE_NAME }}-artifacts + + - name: "Upload artifacts to PyPI using trusted publisher" + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 with: repository-url: "https://upload.pypi.org/legacy/" print-hash: true packages-dir: ${{ env.PACKAGE_NAME }}-artifacts skip-existing: false - outputs: - package_version: ${{ steps.set_package_version.outputs.package_version }} + - name: Release to GitHub + uses: ansys/actions/release-github@7e89e00c5619374a1da8c2e876309d8b15ff0559 # v11.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + library-name: ${{ env.PACKAGE_NAME }} + + docker: needs: build diff --git a/doc/changelog.d/70.maintenance.md b/doc/changelog.d/70.maintenance.md new file mode 100644 index 00000000..71b32f5e --- /dev/null +++ b/doc/changelog.d/70.maintenance.md @@ -0,0 +1 @@ +Prepare for public release diff --git a/pyproject.toml b/pyproject.toml index 1f3dfc72..e58bf77f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-system-version = "1.7.0" [tool.poetry] name = "ansys-visor-viewer" -version = "1.0.0_dev" +version = "1.0.dev0" description = "\"VISOR 3D visualization web component framework\"" authors = ["VISOR Team "] readme = "README.rst"