Skip to content

Commit

Permalink
add powerlift release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch committed Aug 2, 2024
1 parent e348787 commit 1a25a00
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
File renamed without changes.
43 changes: 43 additions & 0 deletions .github/workflows/release_powerlift.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion shared/libebm/interpret.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a25a00

Please sign in to comment.