diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c4ee34..1b2a42c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,9 @@ on: jobs: build: runs-on: ubuntu-latest + concurrency: + group: build + cancel-in-progress: true env: REGISTRY: docker.io REGISTRY_USER: ${{ secrets.REGISTRY_USER }} diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml new file mode 100644 index 0000000..8c09b16 --- /dev/null +++ b/.github/workflows/semantic-release.yml @@ -0,0 +1,21 @@ +name: Semantic Release + +on: + push: + branches: + - master + +jobs: + release: + runs-on: ubuntu-latest + concurrency: release + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + persist-credentials: false + - name: Python Semantic Release + uses: python-semantic-release/python-semantic-release@master + with: + github_token: ${{ secrets.GH_TOKEN }} + root_options: "-v -c releaserc.json" diff --git a/releaserc.json b/releaserc.json new file mode 100644 index 0000000..f111077 --- /dev/null +++ b/releaserc.json @@ -0,0 +1,76 @@ +{ + "semantic_release": { + "assets": [], + "branches": { + "main": { + "match": "(main|master)", + "prerelease_token": "rc", + "prerelease": false + } + }, + "build_command_env": [], + "changelog": { + "template_dir": "templates", + "changelog_file": "CHANGELOG.md", + "exclude_commit_patterns": [], + "environment": { + "block_start_string": "{%", + "block_end_string": "%}", + "variable_start_string": "{{", + "variable_end_string": "}}", + "comment_start_string": "{#", + "comment_end_string": "#}", + "trim_blocks": false, + "lstrip_blocks": false, + "newline_sequence": "\n", + "keep_trailing_newline": false, + "extensions": [], + "autoescape": true + } + }, + "commit_author": { + "env": "GIT_COMMIT_AUTHOR", + "default": "semantic-release " + }, + "commit_message": "{version}\n\nAutomatically generated by python-semantic-release", + "commit_parser": "angular", + "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 + }, + "logging_use_named_masks": false, + "allow_zero_version": false, + "remote": { + "name": "origin", + "type": "github", + "ignore_token_for_push": false, + "insecure": false + }, + "no_git_verify": false, + "tag_format": "v{version}", + "publish": { + "dist_glob_patterns": [ + "dist/*" + ], + "upload_to_vcs_release": false + } + } +}