Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
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: |
Version: `${{ steps.get_version.outputs.version }}`

(https://github.com/${{ github.repository }}/tree/main/packages/${{ github.event.inputs.sdk }})

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 }}