-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 💪 Add workflow to automatize release #18
- Loading branch information
Showing
13 changed files
with
125 additions
and
58 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,33 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout origin repo | ||
uses: actions/[email protected] | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@main | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install Python dependencies | ||
run: pip install --disable-pip-version-check nox pyyaml | ||
|
||
- name: Update tags | ||
id: tags | ||
run: nox -s update-tags | ||
|
||
- name: Create Github release | ||
uses: softprops/[email protected] | ||
with: | ||
tag_name: ${{ steps.tags.outputs.tag }} |
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
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
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
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
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
name: pytest-summary | ||
|
||
dependencies: | ||
- python=3.10 | ||
- black | ||
- flake8 | ||
- isort | ||
- pre-commit | ||
- pytest | ||
- python>=3.12,<3.13 | ||
- pip | ||
- pip: | ||
- nox | ||
- pre-commit | ||
- pyyaml | ||
- pytest | ||
- ruff |
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,33 @@ | ||
import nox | ||
import yaml | ||
|
||
|
||
@nox.session | ||
def update_tags(session: nox.Session): | ||
with open(file="action.yml") as stream: | ||
action = yaml.safe_load(stream=stream) | ||
action = action["runs"]["steps"][2]["uses"] | ||
version = action.split("@")[1] | ||
major = version.split(".")[0] | ||
for tag in [version, major]: | ||
session.run( | ||
"git", | ||
"tag", | ||
"--annotate", | ||
"--force", | ||
"--message", | ||
"", | ||
tag, | ||
external=True, | ||
) | ||
session.run( | ||
"git", | ||
"push", | ||
"--force", | ||
"origin", | ||
tag, | ||
external=True, | ||
) | ||
output_file = session.env["GITHUB_OUTPUT"] | ||
with open(file=output_file, mode="a") as f: | ||
f.write(f"tag={version}\n") |
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,5 @@ | ||
[tool.ruff.lint] | ||
select = ["A", "C", "C4", "E", "F", "I", "Q", "T", "SIM", "UP", "W"] | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"__init__.py" = ["F401"] |