Skip to content

Commit a3a3df9

Browse files
committed
Add release workflow
1 parent 50b237a commit a3a3df9

File tree

5 files changed

+131
-1
lines changed

5 files changed

+131
-1
lines changed

.github/RELEASE_TEMPLATE.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Module Name: baselibs
2+
Release Tag: $RELEASE_TAG
3+
Origin Release Tag: $PREVIOUS_RELEASE_TAG
4+
Release Commit Hash: $COMMIT_SHA
5+
Release Date: $RELEASE_DATE
6+
7+
Overview
8+
--------
9+
The baselibs module provides a selection of basic C++ utility libraries for common use in the S-CORE project.
10+
11+
12+
Disclaimer
13+
----------
14+
This release is not intended for production use, as it does not include a safety argumentation or a completed safety assessment.
15+
The work products compiled in the safety package are created with care according to the [S-CORE process](https://eclipse-score.github.io/process_description/main/index.html). However, as a non-profit, open-source organization, the project cannot assume any liability for its content.
16+
17+
For details on the features, see https://eclipse-score.github.io/score/main/features/baselibs/index.html
18+
19+
Improvements
20+
------------
21+
22+
23+
Bug Fixes
24+
---------
25+
26+
27+
Compatibility
28+
-------------
29+
- `x86_64-unknown-linux-gnu`, `x86_64-unknown-nto-qnx800` and `aarch64-unknown-nto-qnx800` using [score_toolchains_gcc](https://github.com/eclipse-score/bazel_cpp_toolchains).
30+
31+
Performed Verification
32+
----------------------
33+
- Build for `x86_64-unknown-linux-gnu` and `x86_64-unknown-nto-qnx800`.
34+
- Unit tests executed on `x86_64-unknown-linux-gnu`.
35+
36+
Report: $ACTION_RUN_URL
37+
38+
Known Issues
39+
------------
40+
41+
42+
43+
Upgrade Instructions
44+
--------------------
45+
Backward compatibility with the previous release is not guaranteed.
46+
47+
Contact Information
48+
-------------------
49+
For any questions or support, please contact the Base Libs Feature Team (https://github.com/orgs/eclipse-score/discussions/1223) or raise an issue/discussion.

.github/workflows/build_linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919
- main
2020
merge_group:
2121
types: [checks_requested]
22+
workflow_call:
2223
jobs:
2324
linux-build-and-test:
2425
runs-on: ubuntu-latest

.github/workflows/build_qnx.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ on:
1919
- main
2020
merge_group:
2121
types: [checks_requested]
22+
workflow_call:
2223
jobs:
2324
qnx-build:
2425
strategy:
2526
fail-fast: false
2627
matrix:
2728
bazel-config: [bl-x86_64-qnx, bl-aarch64-qnx]
28-
uses: eclipse-score/cicd-workflows/.github/workflows/qnx-build.yml@main
29+
uses: eclipse-score/cicd-workflows/.github/workflows/qnx-build.yml@fail_qnx_on_empty_secret
2930
permissions:
3031
contents: read
3132
pull-requests: read

.github/workflows/coverage_report.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919
- main
2020
merge_group:
2121
types: [checks_requested]
22+
workflow_call:
2223
jobs:
2324
coverage-report:
2425
runs-on: ubuntu-22.04

.github/workflows/release.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
name: Release
14+
run-name: Release ${{ inputs.tag }}
15+
on:
16+
pull_request:
17+
workflow_dispatch:
18+
inputs:
19+
tag:
20+
description: 'Release tag (e.g., v1.0.0)'
21+
required: true
22+
type: string
23+
concurrency:
24+
group: release
25+
jobs:
26+
build-linux:
27+
uses: ./.github/workflows/build_linux.yml
28+
build-qnx:
29+
uses: ./.github/workflows/build_qnx.yml
30+
permissions:
31+
contents: read
32+
pull-requests: read
33+
secrets: inherit
34+
coverage-report:
35+
uses: ./.github/workflows/coverage_report.yml
36+
create-release:
37+
needs: [build-linux, build-qnx, coverage-report]
38+
runs-on: ubuntu-latest
39+
permissions:
40+
contents: write
41+
env:
42+
COVERAGE_ARCHIVE: ${{ github.event.repository.name }}-v0.0.0-coverage.tar.xz
43+
steps:
44+
- name: Checkout Repository
45+
uses: actions/checkout@v6
46+
- name: Get Current Date and Previous Release Tag
47+
env:
48+
GH_TOKEN: ${{ github.token }}
49+
run: |
50+
PREVIOUS_TAG=$(gh release view --json tagName --jq '.tagName' 2>/dev/null || echo "N/A")
51+
echo "RELEASE_DATE=$(date --rfc-3339=date)" >> $GITHUB_ENV
52+
echo "PREVIOUS_RELEASE_TAG=$PREVIOUS_TAG" >> $GITHUB_ENV
53+
- name: Generate Release Body
54+
env:
55+
RELEASE_TAG: ${{ inputs.tag }}
56+
COMMIT_SHA: ${{ github.sha }}
57+
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
58+
run: |
59+
envsubst '$RELEASE_TAG $PREVIOUS_RELEASE_TAG $COMMIT_SHA $RELEASE_DATE $ACTION_RUN_URL' < .github/RELEASE_TEMPLATE.md > release_body.md
60+
- name: Download Coverage Report Artifact
61+
uses: actions/download-artifact@v6
62+
with:
63+
name: ${{ github.event.repository.name }}_coverage_report
64+
path: ${{ env.COVERAGE_ARCHIVE }}
65+
- name: Create Coverage Report Archive
66+
run: |
67+
tar --sort=name --owner=0 --group=0 --numeric-owner \
68+
-cJf "$COVERAGE_ARCHIVE" --directory="$COVERAGE_ARCHIVE" .
69+
- name: Create Draft Release
70+
uses: softprops/action-gh-release@v2
71+
with:
72+
tag_name: "v0.0.0" # ${{ inputs.tag }}
73+
body_path: release_body.md
74+
draft: true
75+
generate_release_notes: true
76+
target_commitish: ${{ github.sha }}
77+
files: |
78+
${{ env.COVERAGE_ARCHIVE }}

0 commit comments

Comments
 (0)