Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .github/workflows/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ permissions:

jobs:
deploy_api_docs:
# Releases of other major versions (e.g. 6.0.0-alpha.1) are not v5 docs.
if: >-
github.event_name != 'release' ||
startsWith(github.ref_name, '5.')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,29 @@ on:
release:
types: [published]

# The tag's major version picks the directory: 5.x.y deploys v5/, 6.x.y
# (including pre-releases such as 6.0.0-alpha.1) deploys v6/.
jobs:
deploy_v5:
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/5.')
uses: libhal/ci/.github/workflows/[email protected]
with:
dir: v5
version: ${{ github.ref_name }}
remote_url: https://libhal.jfrog.io/artifactory/api/conan/trunk-conan
secrets: inherit

deploy_v6:
if: startsWith(github.ref, 'refs/tags/6.')
uses: libhal/ci/.github/workflows/[email protected]
with:
version: ${{ github.ref_name }}
remote_url: https://libhal.jfrog.io/artifactory/api/conan/trunk-conan
modules_support_needed: true
coroutine_support_needed: false
dir: v6
llvm_profile: hal/tc/llvm-23
conan_version: 2.33.0 # first release that knows clang 23
secrets:
conan_remote_password: ${{ secrets.JFROG_LIBHAL_TRUNK_ID_TOKEN }}
conan_remote_user: ${{ secrets.JFROG_LIBHAL_TRUNK_ID_TOKEN_USER }}
36 changes: 12 additions & 24 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,18 @@ on:
push:
branches: [main]

permissions:
contents: write
# 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 v5/ and v6/ independently from (minor) and (patch) in commit
# subjects. See https://github.com/libhal/ci#semantic_releaseyml
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Version
id: version
uses: paulhatch/[email protected]
with:
bump_each_commit: true
major_pattern: "(major)"
minor_pattern: "(minor)"
bump_each_commit_patch_pattern: "(patch)"
tag_prefix: ""
debug: true
- name: Release
if: steps.version.outputs.version_type != 'none'
run: |
gh release create ${{ steps.version.outputs.version_tag }} \
--generate-notes
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE }}
uses: libhal/ci/.github/workflows/[email protected]
with:
lines: '[{"major": 5, "dir": "v5"}, {"major": 6, "dir": "v6"}]'
secrets:
release_token: ${{ secrets.SEMANTIC_RELEASE }}
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ with the phrase `.take` in it to get assigned by our github actions.
small PRs such as fixing typos, fixing up documentation or removing
unnecessary headers.

### :label: Releases

Merging a PR releases a new version when its title (the squashed commit's
subject) contains a keyword:

- `(minor)`: adds to the public API, e.g. a new type or function.
- `(patch)`: fixes a bug, or improves performance or code size.

A PR without a keyword releases nothing. Each major version directory (`v5/`,
`v6/`) is released on its own, and only when the PR changes it. There is no
`(major)` keyword: a maintainer starts each major version by hand. See
[semantic_release.yml](https://github.com/libhal/ci#semantic_releaseyml) for
the details.

### Code Reviews

All submissions, including submissions by project members, require review. We
Expand Down
Loading