Skip to content

Commit

Permalink
build: switched release to python semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
danellecline committed May 21, 2024
1 parent 5742535 commit b073439
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 74 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,17 @@ jobs:

semantic_release:
runs-on: ubuntu-latest
name: Runs semantic release
steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: codfish/[email protected]
- name: Python Semantic Release
id: semantic
uses: python-semantic-release/python-semantic-release@master
with:
dry-run: false
branches: |
['main']
additional-packages: |
['@semantic-release/git']
plugins: |
['@semantic-release/git', '@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/github', '@semantic-release/git']
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: 000000000000000
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: docker push version
if: steps.semantic.outputs.new-release-published == 'true'
Expand Down
61 changes: 0 additions & 61 deletions package.json

This file was deleted.

26 changes: 26 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

[tool.semantic_release]
version_variable = [
"src/app/__init__.py:__version__",
"cdk/app/__init__.py:__version__",
]
major_on_zero = false
branch = "main"

[tool.semantic_release.remote.token]
env = "GITHUB_TOKEN"

[tool.semantic_release.changelog]
changelog_file = "CHANGELOG.md"
exclude_commit_patterns = [
'''chore(?:\([^)]*?\))?: .+''',
'''ci(?:\([^)]*?\))?: .+''',
'''refactor(?:\([^)]*?\))?: .+''',
'''style(?:\([^)]*?\))?: .+''',
'''test(?:\([^)]*?\))?: .+''',
'''build\((?!deps\): .+)''',
'''Merged? .*''',
'''Initial Commit.*''',
# Old semantic-release version commits
'''^\d+\.\d+\.\d+''',
]

0 comments on commit b073439

Please sign in to comment.