Skip to content
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

CI: isRelease flag #89

Merged
merged 5 commits into from
Jan 12, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test_library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ jobs:
- name: "Release to GitHub"
uses: softprops/action-gh-release@v1
with:
files: ~/dist/*.whl
files: ~/dist/ansys-grantami-bomanalytics-openapi-wheel/*.whl
4 changes: 3 additions & 1 deletion .github/workflows/generate_library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
generate-client-library:
name: "Generate and update client library"
runs-on: ubuntu-latest
env:
IS_RELEASE_BRANCH: ${{ (github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release/')) || (github.event_name == 'workflow_dispatch' && startsWith(github.ref_name, 'release/')) }}
if: ${{ github.actor != 'pyansys-bot[bot]' }}

steps:
Expand Down Expand Up @@ -41,7 +43,7 @@ jobs:
working-directory: ansys-grantami-bomanalytics-openapi

- name: "Build client library"
run: mvn -Dbuild-id=${{ github.run_number }} -s .m2/settings.xml compile
run: mvn -Dbuild-id=${{ github.run_number }} ${{ env.IS_RELEASE_BRANCH == 'true' && '-Dis-release' || '' }} -s .m2/settings.xml compile
env:
MAVEN_OPTS: "-Dlog4j2.formatMsgNoLookups=true"
SERVER_USERNAME: ${{ secrets.REPO_USER }}
Expand Down
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@ the standard

1. Ensure the ``main`` branch build status is green, which indicates that that the most recent run of the ``Build and Test
Client Library`` workflow was successful.
2. Create a new branch from the ``main`` branch with the name ``release/MAJOR.MINOR`` (for example, release/0.2).
3. Make the following changes in ``ansys-grantami-bomanalytics-openapi/src/setup.cfg``:
- Set the ``version`` to ``MAJOR.MINOR``.
- Set the ``Development Status`` classifier to ``Development Status :: 5 - Production/Stable``.
4. Commit this file. Push the branch to GitHub and create a new PR for this release that merges it to ``main``.
While effort is focused on the release, changes should not be made to either the YAML definition
or the ``openapi-client-template``.
5. Wait for the PyAnsys developers to functionally test the new release. Testers should locally install this
branch and use it to run the full suite of tests in the ``main`` branch of
[ansys-grantami-bomanalytics](https://github.com/pyansys/grantami-bomanalytics).
6. Tag the release:
2. Create a new branch from the ``main`` branch with the name ``release/MAJOR.MINOR`` and push the branch to GitHub.
3. Do one of the following two steps to generate a 'release' `pyproject.toml` file:
* To change the version number, modify the ``<version>`` XML element in the ``pom.xml`` file and open a Pull Request.
* If the version number is correct, manually run the 'Generate client library' GitHub action on the release branch.
4. Pull the branch and check that the most recent commit includes the 'release' `pyproject.toml` file
5. Tag the release:
```commandline
git tag v<MAJOR.MINOR.0>
git push origin --tags
Expand Down
3 changes: 2 additions & 1 deletion ansys-grantami-bomanalytics-openapi/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "ansys-grantami-bomanalytics-openapi"
description = "Autogenerated client library for the Granta MI BoM Analytics Services."
version = "2.0.0.dev56"
version = "2.0.0.dev61"
license = "MIT"
authors = ["ANSYS, Inc. <[email protected]>"]
maintainers = ["ANSYS, Inc. <[email protected]>"]
homepage = "https://github.com/ansys/grantami-bomanalytics-openapi"
documentation = "https://grantami.docs.pyansys.com"
readme = "README.md"
keywords = ["Ansys", "OpenAPI"]
classifiers = [
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<pythonicPackageName>ansys-grantami-bomanalytics</pythonicPackageName>
<pythonicPackageUrl>https://github.com/pyansys/grantami-bomanalytics</pythonicPackageUrl>
<homepageUrl>https://github.com/ansys/grantami-bomanalytics-openapi</homepageUrl>
<documentationUrl>https://grantami.docs.pyansys.com</documentationUrl>
<packageVersion>${project.version}</packageVersion>
<buildNumber>${build-id}</buildNumber>
<isReleaseBuild>${is-release}</isReleaseBuild>
Expand Down