mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 15:37:44 +00:00
fix: fix release CI (#165)
* test fix release CI * test fix release CI * test fix release CI * test fix release CI * test fix release CI * test fix release CI * test fix release CI * test fix release CI * remove bump2version from release CI * change code * split release CI * format with toml-sort * change triggers * Update pyproject.toml * optimize code * fix sort-toml error * merge release & upload * fix release error * test release ci * test release ci * test release ci * test release ci * test release ci * test release ci * test release ci * test release ci * test release ci * test release ci * test release ci * test release ci * test release ci * test release ci * test release ci --------- Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,15 @@
|
||||
<!--- Thank you for submitting a Pull Request! In order to make our work smoother, please make sure your Pull Request meets the following requirements: 1. Provide a general summary of your changes in the Title above; 2. Add appropriate prefixes to titles, such as `build:`, `chore:`, `ci:`, `deps:`, `doc:`, `docs:`, `feat:`, `fix:`, `perf:`, `ref:`, `refactor:`, `revert:`, `style:`, `test:`, `tests:`. -->
|
||||
<!--- Thank you for submitting a Pull Request! In order to make our work smoother. -->
|
||||
<!--- please make sure your Pull Request meets the following requirements: -->
|
||||
<!--- 1. Provide a general summary of your changes in the Title above; -->
|
||||
<!--- 2. Add appropriate prefixes to titles, such as `build:`, `chore:`, `ci:`, `docs:`, `feat:`, `fix:`, `perf:`, `refactor:`, `revert:`, `style:`, `test:`(Ref: https://www.conventionalcommits.org/). -->
|
||||
<!--- Category: -->
|
||||
<!--- Patch Updates: `fix:` -->
|
||||
<!--- Example: fix(auth): correct login validation issue -->
|
||||
<!--- minor update (introduces new functionality): `feat` -->
|
||||
<!--- Example: feature(parser): add ability to parse arrays -->
|
||||
<!--- major update(destructive update): Include BREAKING CHANGE in the commit message footer, or add `! ` in the commit footer to indicate that there is a destructive update. -->
|
||||
<!--- Example: feat(auth)! : remove support for old authentication method -->
|
||||
<!--- Other updates: `build:`, `chore:`, `ci:`, `docs:`, `perf:`, `refactor:`, `revert:`, `style:`, `test:`. -->
|
||||
|
||||
## Description
|
||||
<!--- Describe your changes in detail -->
|
||||
|
||||
@@ -7,7 +7,7 @@ jobs:
|
||||
steps:
|
||||
- name: Check PR Title for Conventional Commit Format
|
||||
run: |
|
||||
if ! echo "${{ github.event.pull_request.title }}" | grep -Pq '^(build|chore|ci|deps|doc|docs|feat|fix|perf|ref|refactor|revert|style|test|tests|Bump version)(\(\w+\))?!?:\s.*'; then
|
||||
if ! echo "${{ github.event.pull_request.title }}" | grep -Pq '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(\w+\))?!?:\s.*'; then
|
||||
echo 'The title does not conform to the Conventional Commit.'
|
||||
echo 'Please refer to "https://www.conventionalcommits.org/"'
|
||||
exit 1
|
||||
|
||||
@@ -23,51 +23,22 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install setuptools wheel twine bump2version git-changelog # better-exceptions(optional for debug)
|
||||
- name: Bump version
|
||||
run: |
|
||||
git config --global user.name 'github-actions[bot]'
|
||||
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
bump2version patch
|
||||
NEW_VERSION=$(grep -Po '(?<=^version = ")[^"]*' pyproject.toml)
|
||||
echo "new_version=$NEW_VERSION" >> $GITHUB_ENV
|
||||
echo "New version: $NEW_VERSION"
|
||||
- name: Push changes
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
echo "${{ secrets.PRIVATE_KEY }}" >> ~/private_key
|
||||
chmod 600 ~/private_key
|
||||
GIT_SSH_COMMAND="ssh -i ~/private_key" git push --follow-tags
|
||||
- name: Generate changelog
|
||||
run: |
|
||||
make changelog
|
||||
- name: Prepare release notes
|
||||
run: make release-notes > release-notes.md
|
||||
- name: Create GitHub release
|
||||
uses: softprops/action-gh-release@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
pip install setuptools wheel twine # better-exceptions(optional for debug)
|
||||
- name: Release please
|
||||
id: release_please
|
||||
uses: googleapis/release-please-action@v4
|
||||
with:
|
||||
tag_name: ${{ env.new_version }}
|
||||
release_name: Release ${{ env.new_version }}
|
||||
body_path: release-notes.md
|
||||
prerelease: false
|
||||
# package:
|
||||
# needs: release
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
# - name: Set up Python
|
||||
# uses: actions/setup-python@v5
|
||||
# with:
|
||||
# cache: pip
|
||||
# python-version: '3.10'
|
||||
# - run: env | sort
|
||||
# - run: make dev
|
||||
# - run: make build
|
||||
# - env:
|
||||
# TWINE_USERNAME: __token__
|
||||
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
||||
# run: |
|
||||
# make upload
|
||||
# The current PAT (personal access token) was created on 2024-08-05,
|
||||
# since the maximum validity of PAT is 1 year, you need to change the PAT before 2025-08-05.
|
||||
token: ${{ secrets.PAT }}
|
||||
release-type: simple
|
||||
- run: env | sort
|
||||
- run: make dev
|
||||
- run: make build
|
||||
- name: upload
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
||||
run: |
|
||||
make upload
|
||||
|
||||
+3
-2
@@ -20,17 +20,16 @@ description = "Research & Development Agent"
|
||||
dynamic = [
|
||||
"dependencies",
|
||||
"optional-dependencies",
|
||||
"version",
|
||||
]
|
||||
keywords = [
|
||||
"Autonomous Agents",
|
||||
"Large Language Models",
|
||||
"Research and Development",
|
||||
]
|
||||
license = {text = "MIT License"}
|
||||
name = "rdagent"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
version = "v0.0.0"
|
||||
|
||||
[project.urls]
|
||||
homepage = "https://github.com/microsoft/RD-Agent/"
|
||||
@@ -108,6 +107,8 @@ package = {file = ["requirements/package.txt"]}
|
||||
test = {file = ["requirements/test.txt"]}
|
||||
|
||||
[tool.setuptools_scm]
|
||||
local_scheme = "no-local-version"
|
||||
version_scheme = "guess-next-dev"
|
||||
|
||||
[tool.tomlsort]
|
||||
all = true
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
build
|
||||
setuptools-scm
|
||||
twine
|
||||
wheel
|
||||
|
||||
Reference in New Issue
Block a user