-
Notifications
You must be signed in to change notification settings - Fork 55
CM-22812 - Setup pre-release flow #106
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
970ffc6
migrate to Poetry; fix package structure
MarshalX 3c1d200
fix imports
MarshalX 3f0f16d
fix workflow with tests
MarshalX dda0b77
fix workflow with tests
MarshalX 973d998
update dockerfile to use Poetry
MarshalX 22cb24b
remove setuptools from deps; remove legacy data_files
MarshalX c6b7007
add dynamic version from Git Tag
MarshalX 3564aa5
improve config of dynamic versioning
MarshalX 826b0cf
add ability to create archive with support of dynamic versioning from…
MarshalX 60a7b05
lock deps in dockerfile
MarshalX 09a975a
disable pip and poetry cache
MarshalX 6a464a4
update pytest and pytest-mock to fix vulnerability in py lib
MarshalX 2b58af3
fix import for type checking
MarshalX ecdb7bb
delete legacy file with version
MarshalX 3c9a689
add pre-release workflow
MarshalX 87ddda3
test if check
MarshalX 77d62fc
add debug msg with package version
MarshalX 4490532
add poetry plugin
MarshalX 7d2e5c7
fix fetching of Git tags
MarshalX 79c21ad
install poetry plugin attempt 2
MarshalX 72d0d0e
remove old workflow for publishing to PyPI
MarshalX d0c885b
Merge branch 'main' into CM-22812-setup-pre-release-flow
MarshalX 9dfbb41
add deploy to PyPI
MarshalX 99da7d2
fix
MarshalX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,55 @@ | ||
| name: Build and Publish pre-release | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| pre_release: | ||
| name: Pre-Release | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| actions: write | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Python 3.7 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.7' | ||
|
|
||
| - name: Install Poetry | ||
| run: | | ||
| curl -sSL https://install.python-poetry.org | python - -y | ||
|
|
||
| - name: Update PATH | ||
| run: echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Install Poetry Plugin | ||
| run: poetry self add "poetry-dynamic-versioning[plugin]" | ||
|
|
||
| - name: Check Pre-Release Version | ||
| id: check-version | ||
| run: | | ||
| echo "::debug::Package version: $(poetry version --short)" | ||
| [[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo prerelease=true >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Exit if not Pre-Release Version | ||
| if: steps.check-version.outputs.prerelease != 'true' | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| gh run cancel ${{ github.run_id }} | ||
| gh run watch ${{ github.run_id }} | ||
|
|
||
| - name: Build package | ||
| run: poetry build | ||
|
|
||
| - name: Publish a Python distribution to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.