Merge branch 'main' of github.com:jupyter-naas/abi #851
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| - main | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.workflow }}-release-${{ github.ref_name }} | |
| cancel-in-progress: false | |
| environment: | |
| name: pypi | |
| env: | |
| naas_abi_core_dir: libs/naas-abi-core | |
| naas_abi_marketplace_dir: libs/naas-abi-marketplace | |
| naas_abi_dir: libs/naas-abi | |
| naas_abi_cli_dir: libs/naas-abi-cli | |
| steps: | |
| - name: Setup | Checkout Repository on Release Branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.ref_name }} | |
| - name: Setup | Force release branch to be at workflow sha | |
| run: | | |
| git reset --hard ${{ github.sha }} | |
| # ------------------------------------------------------------------- # | |
| # Note the use of different IDs to distinguish which submodule was # | |
| # identified to be released. The subsequent actions then reference # | |
| # their specific release ID to determine if a release occurred. # | |
| # ------------------------------------------------------------------- # | |
| - name: Release naas-abi-core | |
| id: release-naas-abi-core | |
| uses: python-semantic-release/python-semantic-release@v10.5.2 | |
| with: | |
| directory: ${{ env.naas_abi_core_dir }} | |
| github_token: ${{ secrets.M_ACCESS_TOKEN }} | |
| - name: Release naas-abi-marketplace | |
| id: release-naas-abi-marketplace | |
| uses: python-semantic-release/python-semantic-release@v10.5.2 | |
| with: | |
| directory: ${{ env.naas_abi_marketplace_dir }} | |
| github_token: ${{ secrets.M_ACCESS_TOKEN }} | |
| - name: Release naas-abi | |
| id: release-naas-abi | |
| uses: python-semantic-release/python-semantic-release@v10.5.2 | |
| with: | |
| directory: ${{ env.naas_abi_dir }} | |
| github_token: ${{ secrets.M_ACCESS_TOKEN }} | |
| - name: Release naas-abi-cli | |
| id: release-naas-abi-cli | |
| uses: python-semantic-release/python-semantic-release@v10.5.2 | |
| with: | |
| directory: ${{ env.naas_abi_cli_dir }} | |
| github_token: ${{ secrets.M_ACCESS_TOKEN }} | |
| - name: Publish | Upload naas-abi-core to GitHub Release Assets | |
| uses: python-semantic-release/publish-action@v10.5.2 | |
| if: steps.release-naas-abi-core.outputs.released == 'true' | |
| with: | |
| directory: ${{ env.naas_abi_core_dir }} | |
| github_token: ${{ secrets.M_ACCESS_TOKEN }} | |
| tag: ${{ steps.release-naas-abi-core.outputs.tag }} | |
| - name: Publish | Upload naas-abi-marketplace to GitHub Release Assets | |
| uses: python-semantic-release/publish-action@v10.5.2 | |
| if: steps.release-naas-abi-marketplace.outputs.released == 'true' | |
| with: | |
| directory: ${{ env.naas_abi_marketplace_dir }} | |
| github_token: ${{ secrets.M_ACCESS_TOKEN }} | |
| tag: ${{ steps.release-naas-abi-marketplace.outputs.tag }} | |
| - name: Publish | Upload naas-abi to GitHub Release Assets | |
| uses: python-semantic-release/publish-action@v10.5.2 | |
| if: steps.release-naas-abi.outputs.released == 'true' | |
| with: | |
| directory: ${{ env.naas_abi_dir }} | |
| github_token: ${{ secrets.M_ACCESS_TOKEN }} | |
| tag: ${{ steps.release-naas-abi.outputs.tag }} | |
| - name: Publish | Upload naas-abi-cli to GitHub Release Assets | |
| uses: python-semantic-release/publish-action@v10.5.2 | |
| if: steps.release-naas-abi-cli.outputs.released == 'true' | |
| with: | |
| directory: ${{ env.naas_abi_cli_dir }} | |
| github_token: ${{ secrets.M_ACCESS_TOKEN }} | |
| tag: ${{ steps.release-naas-abi-cli.outputs.tag }} | |
| # ------------------------------------------------------------------- # | |
| # Python Semantic Release is not responsible for publishing your # | |
| # python artifacts to PyPI. Use the official PyPA publish action # | |
| # instead. The following steps are an example but is not guaranteed # | |
| # to work as the action is not maintained by the # | |
| # python-semantic-release team. # | |
| # ------------------------------------------------------------------- # | |
| - name: Publish | Upload naas-abi-core to PyPI | |
| uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # vX.X.X | |
| if: steps.release-naas-abi-core.outputs.released == 'true' | |
| with: | |
| packages-dir: ${{ format('{0}/dist', env.naas_abi_core_dir) }} | |
| - name: Publish | Upload naas-abi-marketplace to PyPI | |
| uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # vX.X.X | |
| if: steps.release-naas-abi-marketplace.outputs.released == 'true' | |
| with: | |
| packages-dir: ${{ format('{0}/dist', env.naas_abi_marketplace_dir) }} | |
| - name: Publish | Upload naas-abi to PyPI | |
| uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # vX.X.X | |
| if: steps.release-naas-abi.outputs.released == 'true' | |
| with: | |
| packages-dir: ${{ format('{0}/dist', env.naas_abi_dir) }} | |
| - name: Publish | Upload naas-abi-cli to PyPI | |
| uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # vX.X.X | |
| if: steps.release-naas-abi-cli.outputs.released == 'true' | |
| with: | |
| packages-dir: ${{ format('{0}/dist', env.naas_abi_cli_dir) }} |