-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from algorandfoundation/ci/check_version_increment
ci: check version increment before release
- Loading branch information
Showing
4 changed files
with
85 additions
and
69 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,42 @@ | ||
name: "Python Semantic Release" | ||
description: "An action to run release a python package with semantic release" | ||
inputs: | ||
github_token: | ||
description: "The GitHub token to use for authentication" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: pre-commit and pytest | ||
shell: bash | ||
run: | | ||
set -o pipefail | ||
poetry run pre-commit run --all-files && git diff --exit-code | ||
poetry run pytest | ||
- name: Set Git user as GitHub actions | ||
shell: bash | ||
run: git config --global user.email "actions@github.com" && git config --global user.name "github-actions" | ||
|
||
- name: Update release | ||
shell: bash | ||
run: poetry run semantic-release --strict version | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.github_token }} | ||
|
||
- name: Create Wheel | ||
shell: bash | ||
run: poetry build --format wheel | ||
|
||
- uses: actions/upload-artifact@v4 # upload artifacts so they are retained on the job | ||
with: | ||
path: dist | ||
|
||
- name: Publish to GitHub | ||
run: poetry run semantic-release publish | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.github_token }} | ||
|
||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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,26 @@ | ||
name: "Setup Algokit Python Environment" | ||
description: "An action to setup the python environmen with algokit and poetry" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install poetry | ||
shell: bash | ||
run: pipx install poetry | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: "poetry" | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: poetry install --no-interaction | ||
|
||
- name: Install algokit | ||
shell: bash | ||
run: pipx install algokit | ||
|
||
- name: Run localnet | ||
shell: bash | ||
run: algokit localnet start |
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
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