-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- platform | ||
categories: | ||
- title: Breaking Changes 🛠 | ||
labels: | ||
- Semver-Major | ||
- breaking-change | ||
- title: New Features 🎉 | ||
labels: | ||
- Semver-Minor | ||
- feature | ||
- title: Other Changes | ||
labels: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Publish to Test PyPI | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
PYTHON_VERSION: | ||
description: "Python Version" | ||
required: false | ||
default: "3.10.13" | ||
POETRY_VERSION: | ||
description: "The version of Poetry to use" | ||
required: false | ||
default: "1.8.2" | ||
defaults: | ||
run: | ||
working-directory: ./tools | ||
jobs: | ||
test_pypi_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install poetry | ||
run: pip install poetry==${{ inputs.POETRY_VERSION }} | ||
shell: bash | ||
- name: Set up Python ${{ inputs.PYTHON_VERSION }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.PYTHON_VERSION }} | ||
- run: poetry install | ||
- run: poetry config repositories.testpypi https://test.pypi.org/legacy/ | ||
- run: poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_TOKEN }} | ||
- name: Publish package | ||
run: poetry publish --build -r testpypi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Publish to PyPI | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
PYTHON_VERSION: | ||
description: "Python Version" | ||
required: false | ||
default: "3.10.13" | ||
POETRY_VERSION: | ||
description: "The version of Poetry to use" | ||
required: false | ||
default: "1.8.2" | ||
RELEASE_TAG: | ||
description: "The new version should be a valid PEP 440 string" | ||
required: true | ||
default: "0.0.1" | ||
defaults: | ||
run: | ||
working-directory: ./tools | ||
jobs: | ||
pypi_release: | ||
name: Builds Using Poetry and Publishes to PyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install poetry | ||
run: pip install poetry==${{ inputs.POETRY_VERSION }} | ||
shell: bash | ||
- name: Set up Python ${{ inputs.PYTHON_VERSION }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.PYTHON_VERSION }} | ||
- name: Add and Commit Version | ||
run: | | ||
poetry version ${{ inputs.RELEASE_TAG }} | ||
git add ./pyproject.toml | ||
git config --global user.name "Release Bot" | ||
git config --global user.email "[email protected]" | ||
git commit -m "Change version to ${{ inputs.RELEASE_TAG }}" --allow-empty | ||
git push origin | ||
shell: bash | ||
- run: poetry install | ||
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}" | ||
- name: Publish package | ||
run: poetry publish --build | ||
- name: Build binary | ||
run: poetry run build | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "tools/dist/cgdevxcli" | ||
generateReleaseNotes: true | ||
commit: main | ||
tag: ${{ inputs.RELEASE_TAG }} |