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

Main #253

Merged
merged 6 commits into from
Oct 28, 2024
Merged

Main #253

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
60 changes: 25 additions & 35 deletions .copier-template/.github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,36 @@ on:
paths:
- ".docker/**"

permissions:
contents: write
issues: write
pull-requests: write

jobs:
build:
# Name the Job
name: semantic-release
# Set the agent to run on
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
release:
runs-on: ubuntu-latest
concurrency: release
environment: release

permissions:
id-token: write
contents: write

# Load all steps #
steps:
# Checkout the code base #
- name: Checkout Code
# Note: we need to checkout the repository at the workflow sha in case during the workflow
# the branch was updated. To keep PSR working with the configured release branches,
# we force a checkout of the desired release branch but at the workflow sha HEAD.
- name: Setup | Checkout Repository at workflow sha
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.sha }}

# set env variable
- name: Set env variable
run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV

# install poetry
- name: Install poetry
run: pipx install poetry>=1.3.2

# install dependencies
- name: Install dependencies
run: poetry install --with dev

- name: Python Semantic Release to PyPI
- name: Setup | Force correct release branch on workflow sha
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
poetry run semantic-release publish --verbosity=DEBUG --define=branch=${{ env.BRANCH }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
git checkout -B ${{ github.ref_name }} ${{ github.sha }}

- name: Action | Semantic Version Release
id: release
# Adjust tag with desired version if applicable.
uses: python-semantic-release/python-semantic-release@v9.12.0
with:
build: true
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "actions@users.noreply.github.com"
76 changes: 61 additions & 15 deletions .copier-template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ python = ">=3.9,<3.13"
optional = true

[tool.poetry.group.dev.dependencies]
python-semantic-release = "^7.33.1"
python-semantic-release = "^9.12.0"

{% if poe_task_files -%}
[tool.poe]
Expand All @@ -26,19 +26,65 @@ name = "cz_conventional_commits"
tag_format = "v$version"

[tool.semantic_release]
branch = "main"
version_toml = "pyproject.toml:tool.poetry.version"
{% if use_semantic_versioning_for_image -%}
version_pattern = '.docker/docker.version:`{{ docker_image_version_variable_name }}`="{version}"'
{%- endif %}
version_source = "tag"
commit_version_number = true # required for version_source = "tag"
commit_subject = "chore(release): :rocket: {version} [skip ci]"
prerelease_tag = "rc"
# General settings
tag_format = "v{version}"
commit_parser = "angular"
major_on_zero = true
allow_zero_version = true
tag_commit = true
changelog_file = "CHANGELOG.md"
upload_to_repository = false
upload_to_release = false
hvcs = "github" # hosting version control system, gitlab is also supported
build_command = "mkdir -p dist && echo 'No build command configured' > dist/release.txt"
no_git_verify = false
version_source = "tag"
commit_version_number = true
commit_message = "{version}\n\nAutomatically generated by python-semantic-release"

# Version variables
version_toml = ["pyproject.toml:tool.poetry.version"]
{% if use_semantic_versioning_for_image -%}
version_variables = [".docker/docker.version:`{{ docker_image_version_variable_name }}`"]
{%- endif %}

# Remote settings
[tool.semantic_release.remote]
name = "origin"
type = "github"
ignore_token_for_push = false
insecure = false

# Changelog settings
[tool.semantic_release.changelog]
insertion_flag = "<!--next-version-placeholder-->"
mode = "update"

# Commit parser options
[tool.semantic_release.commit_parser_options]
allowed_tags = [
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"style",
"refactor",
"test",
]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]
default_bump_level = 0

# Branch settings
[tool.semantic_release.branches.main]
match = "(main|master|release)"
prerelease_token = "rc"
prerelease = false

# Commit author settings
[tool.semantic_release.commit_author]
env = "GIT_COMMIT_AUTHOR"
default = "semantic-release <semantic-release>"

# Publish settings
[tool.semantic_release.publish]
dist_glob_patterns = ["dist/*"]
upload_to_vcs_release = false
2 changes: 1 addition & 1 deletion .docker/docker.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
IMAGE_VERSION="0.32.0" # The version of the project
IMAGE_VERSION="0.33.0" # The version of the project
53 changes: 0 additions & 53 deletions .github/workflows/prerelease.yaml

This file was deleted.

60 changes: 25 additions & 35 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,36 @@ on:
- ".docker/**"
- ".copier-template/**"

permissions:
contents: write
issues: write
pull-requests: write

jobs:
build:
# Name the Job
name: semantic-release
# Set the agent to run on
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
release:
runs-on: ubuntu-latest
concurrency: release
environment: release

permissions:
id-token: write
contents: write

# Load all steps #
steps:
# Checkout the code base #
- name: Checkout Code
# Note: we need to checkout the repository at the workflow sha in case during the workflow
# the branch was updated. To keep PSR working with the configured release branches,
# we force a checkout of the desired release branch but at the workflow sha HEAD.
- name: Setup | Checkout Repository at workflow sha
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.sha }}

# set env variable
- name: Set env variable
run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV

# install poetry
- name: Install poetry
run: pipx install poetry>=1.3.2

# install dependencies
- name: Install dependencies
run: poetry install --with dev

- name: Python Semantic Release to PyPI
- name: Setup | Force correct release branch on workflow sha
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
poetry run semantic-release publish --verbosity=DEBUG --define=branch=${{ env.BRANCH }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
git checkout -B ${{ github.ref_name }} ${{ github.sha }}

- name: Action | Semantic Version Release
id: release
# Adjust tag with desired version if applicable.
uses: python-semantic-release/python-semantic-release@v9.12.0
with:
build: true
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "actions@users.noreply.github.com"
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
<!--next-version-placeholder-->

## v0.33.0 (2024-10-28)

### Chores

* chore: Remove unused .github/workflows/release.yaml file ([`b1f2555`](https://github.com/entelecheia/hyperfast-docker-template/commit/b1f2555af0777faff6fa712f1a683833eb20cf19))

* chore: Remove unused .github/workflows/prerelease.yaml file ([`e8f4bed`](https://github.com/entelecheia/hyperfast-docker-template/commit/e8f4bed1963fc743b641524363d29aab23ecf4e0))

### Features

* feat: Update python-semantic-release version to 9.12.0 and remove unused .github/workflows/prerelease.yaml file ([`f26e8e9`](https://github.com/entelecheia/hyperfast-docker-template/commit/f26e8e975306b8253de9ccceadc77f8e01c86028))

* feat: Update python-semantic-release version to 9.12.0 ([`4669038`](https://github.com/entelecheia/hyperfast-docker-template/commit/466903829ce5be9bb7074d563445392f21aee4c5))

### Unknown

* Merge pull request #252 from entelecheia/entelecheia/issue251 ([`279ed07`](https://github.com/entelecheia/hyperfast-docker-template/commit/279ed070aaccb0995f9a8f9d0fa45a94c9938aec))

* Merge pull request #248 from entelecheia/release

Release ([`8e724c4`](https://github.com/entelecheia/hyperfast-docker-template/commit/8e724c4b07246e73cec22b8fd92682994de3a683))


## v0.32.0 (2024-10-15)

### Feature
Expand Down
Loading