From f5eed86e7a2e9684cf231ec6845972df4b2fbae5 Mon Sep 17 00:00:00 2001 From: Snehil Kishore Date: Tue, 1 Apr 2025 11:16:45 +0530 Subject: [PATCH 1/2] Manual Release Workflow --- .github/workflows/release.yml | 79 +++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1e32587 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,79 @@ +name: Manual SDK Release + +on: + workflow_dispatch: + inputs: + sdk: + description: 'SDK name (e.g., auth0_server_python)' + required: true + version: + description: 'Version (e.g., 1.0.0b1). Leave blank to read from pyproject.toml.' + required: false + +jobs: + release: + name: Release ${{ github.event.inputs.sdk }} + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install Poetry + run: curl -sSL https://install.python-poetry.org | python3 - + + - name: Add Poetry to PATH + run: echo "$HOME/.local/bin" >> $GITHUB_PATH + + - name: Get version from pyproject.toml + id: get_version + run: | + cd packages/${{ github.event.inputs.sdk }} + if [ -z "${{ github.event.inputs.version }}" ]; then + VERSION=$(poetry version -s) + else + VERSION="${{ github.event.inputs.version }}" + fi + echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: Install dependencies + working-directory: packages/${{ github.event.inputs.sdk }} + run: poetry install --no-root + + - name: Build package + working-directory: packages/${{ github.event.inputs.sdk }} + run: poetry build + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ github.event.inputs.sdk }}-v${{ steps.get_version.outputs.version }} + name: "${{ github.event.inputs.sdk }} v${{ steps.get_version.outputs.version }}" + body: | + ## đŸ“Ļ SDK: `${{ github.event.inputs.sdk }}` + Version: `${{ steps.get_version.outputs.version }}` + + ### 🔗 Source Directory + [View Source](https://github.com/${{ github.repository }}/tree/main/packages/${{ github.event.inputs.sdk }}) + + ### đŸ“Ĩ Build Artifacts + These are the built distributions for this release. + + > â„šī¸ GitHub's "Source code" links below point to the full monorepo. + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload build artifacts + uses: softprops/action-gh-release@v1 + with: + files: | + packages/${{ github.event.inputs.sdk }}/dist/*.whl + packages/${{ github.event.inputs.sdk }}/dist/*.tar.gz + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1c0bb7221bfa3760aab64610cb7756c9df48f63d Mon Sep 17 00:00:00 2001 From: Snehil Kishore Date: Tue, 1 Apr 2025 11:17:02 +0530 Subject: [PATCH 2/2] Manual Release Workflow --- .github/workflows/release.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e32587..6cb0938 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,16 +56,10 @@ jobs: tag_name: ${{ github.event.inputs.sdk }}-v${{ steps.get_version.outputs.version }} name: "${{ github.event.inputs.sdk }} v${{ steps.get_version.outputs.version }}" body: | - ## đŸ“Ļ SDK: `${{ github.event.inputs.sdk }}` Version: `${{ steps.get_version.outputs.version }}` - ### 🔗 Source Directory - [View Source](https://github.com/${{ github.repository }}/tree/main/packages/${{ github.event.inputs.sdk }}) + (https://github.com/${{ github.repository }}/tree/main/packages/${{ github.event.inputs.sdk }}) - ### đŸ“Ĩ Build Artifacts - These are the built distributions for this release. - - > â„šī¸ GitHub's "Source code" links below point to the full monorepo. env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}