diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml new file mode 100644 index 0000000..60d9710 --- /dev/null +++ b/.github/workflows/semantic-release.yml @@ -0,0 +1,35 @@ +# Copyright 2026 Khalil Estell and the libhal contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 🏷️ Semantic Release +on: + push: + branches: [main] + +# Versions are computed from the tags present when a run starts. Don't let two +# pushes compute the same version. +concurrency: + group: semantic-release + cancel-in-progress: false + +jobs: + # Releases this repository from (minor) and (patch) in commit subjects, + # using its own semantic_release.yml at the pushed commit. + release: + uses: ./.github/workflows/semantic_release.yml + with: + lines: '[{"major": 5, "dir": "."}]' + ci_ref: ${{ github.sha }} + secrets: + release_token: ${{ secrets.SEMANTIC_RELEASE }} diff --git a/README.md b/README.md index dde6611..749ea06 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,8 @@ These workflows are used internally by the libhal/ci repository and are not typically called directly by other repositories: - `rebase.yml`: Automatically rebases the 5.x.y branch onto main +- `semantic-release.yml`: Releases this repository from `(minor)` and `(patch)` + in commit subjects, using its own `semantic_release.yml` - `self_check.yml`: Runs checks on various libhal libraries to ensure workflows are functioning correctly - `take.yml`: Allows contributors to self-assign issues by commenting `.take`