Skip to content

[Github][MLGO] Add workflow to release mlgo utils #78885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
40 changes: 40 additions & 0 deletions .github/workflows/publish-mlgo-utils.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release mlgo-utils

permissions:
contents: read

on:
workflow_dispatch:
inputs:
branch:
description: 'Branch'
required: true
type: string

jobs:
release-mlgo-utils:
name: Release mlgo-utils
runs-on: ubuntu-latest
steps:
- name: Checkout LLVM
uses: actions/[email protected]
with:
ref: "${{ inputs.branch }}"
- name: Install dependencies
run: |
pip3 install build==0.10.0 setuptools==68.0.00
- name: Package mlgo-utils
run: |
cd llvm/utils/mlgo-utils
python3 -m build
- name: Upload mlgo-utils to test.pypi.org
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.MLGO_UTILS_TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
packages-dir: llvm/utils/mlgo-utils/dist/
- name: Upload mlgo-utils to pypi.org
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.MLGO_UTILS_PYPI_API_TOKEN }}
packages-dir: llvm/utils/mlgo-utils/dist/
8 changes: 7 additions & 1 deletion llvm/utils/mlgo-utils/mlgo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

from datetime import timezone, datetime

__versioninfo__ = (18, 0, 0)
__version__ = ".".join(str(v) for v in __versioninfo__) + "dev"
__version__ = (
".".join(str(v) for v in __versioninfo__)
+ "dev"
+ datetime.now(tz=timezone.utc).strftime("%Y%m%d%H%M")
)
2 changes: 1 addition & 1 deletion llvm/utils/mlgo-utils/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "mlgo"
name = "mlgo-utils"
description = "Tooling for ML in LLVM"
readme = "README.md"
requires-python = ">=3.8,<3.11"
Expand Down