diff --git a/.github/workflows/release.yml b/.github/workflows/release_interpret.yml similarity index 100% rename from .github/workflows/release.yml rename to .github/workflows/release_interpret.yml diff --git a/.github/workflows/release_powerlift.yml b/.github/workflows/release_powerlift.yml new file mode 100644 index 000000000..f1737adf4 --- /dev/null +++ b/.github/workflows/release_powerlift.yml @@ -0,0 +1,43 @@ +name: release_powerlift + +on: + workflow_dispatch: + inputs: + commit_id: + description: 'Commit ID (required for manual trigger)' + required: true + +jobs: + publish_packages: + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.9' + - name: Find CI workflow run by commit ID + id: find_workflow + run: | + commit_id="${{ github.event.inputs.commit_id }}" + if [ -z "$commit_id" ]; then + echo "Error: commit_id is empty." + exit 1 + fi + echo "Commit ID: ${commit_id}" + workflow_runs=$(gh api -X GET "/repos/${{ github.repository }}/actions/runs?status=success" -q '.workflow_runs | map(select(.head_commit.id == "'"${commit_id}"'" and .name == "interpret-CI")) | sort_by(.created_at) | reverse | .[0]') + run_id=$(echo "$workflow_runs" | jq -r '.id') + echo "Run ID: ${run_id}" + echo "run_id=${run_id}" >> $GITHUB_ENV + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Download powerlift artifact + uses: actions/download-artifact@v4 + with: + run-id: ${{ env.run_id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + name: powerlift + path: dist + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/shared/libebm/interpret.sln b/shared/libebm/interpret.sln index b08bbea46..8a89c6da2 100644 --- a/shared/libebm/interpret.sln +++ b/shared/libebm/interpret.sln @@ -19,7 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{F5894036-A ..\..\CONTRIBUTING.md = ..\..\CONTRIBUTING.md ..\..\docs\interpret\hyperparameters.md = ..\..\docs\interpret\hyperparameters.md ..\..\README.md = ..\..\README.md - ..\..\.github\workflows\release.yml = ..\..\.github\workflows\release.yml + ..\..\.github\workflows\release_powerlift.yml = ..\..\.github\workflows\release_powerlift.yml + ..\..\.github\workflows\release_interpret.yml = ..\..\.github\workflows\release_interpret.yml ..\..\scripts\release_process.txt = ..\..\scripts\release_process.txt ..\..\python\interpret\setup.py = ..\..\python\interpret\setup.py vs_python_setup.txt = vs_python_setup.txt