feat: add release action
All checks were successful
release / Release (push) Successful in 15s

This commit is contained in:
2025-05-06 14:26:14 +02:00
parent 449dbbce49
commit ea95f2d970
3 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,37 @@
[tool.semantic_release.branches.main]
match = "(main)"
prerelease = false
[tool.semantic_release.commit_author]
env = "GIT_COMMIT_AUTHOR"
default = "semantic-release <semantic-release>"
[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
[tool.semantic_release.remote]
name = "origin"
type = "gitea"
domain = "https://gitea.psi.ch"
ignore_token_for_push = false
[tool.semantic_release.remote.token]
env = "GITHUB_TOKEN"
[tool.semantic_release.publish]
dist_glob_patterns = ["dist/*"]
upload_to_vcs_release = true

View File

@ -0,0 +1,28 @@
name: release
on:
push:
branches:
- main
- feat/release_actions
permissions:
contents: read
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: run_release
env:
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: pipx run python-semantic-release -c .gitea/semantic_release.toml version

View File

@ -1,3 +1,6 @@
_exclude:
- ".gitea/"
# predefined values
# make sure these have 'when: false' so that the questions are not asked and the items are not saved in answers.yml