Skip to content

chore(driver): bump API version patch. #34

chore(driver): bump API version patch.

chore(driver): bump API version patch. #34

Workflow file for this run

name: Generate release body
on:
workflow_run:
workflows: ["Test drivers against a matrix of kernels/distros"]
types: [completed]
branches-ignore: ['master'] # ignore master runs (we could skip this given the below extract semver check; still, this is a small optimization)
permissions:
contents: write
concurrency:
group: "release-body"
cancel-in-progress: true
jobs:
release-body:
runs-on: ubuntu-latest
steps:
# Note: there is no `tag` filter for `workflow_run`.
# We need to manually check whether we are running on a tag.
- name: Extract semver ℹ️
uses: actions-ecosystem/action-regex-match@v2
id: regex-match
with:
text: ${{ github.event.workflow_run.head_branch }}
regex: '[0-9]+.[0-9]+.[0-9]+\+driver$'
- name: Skip on non driver tag
if: steps.regex-match.outputs.match == ''
run: exit 0
- name: Clone libs repo
actions: checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Extract API and SCHEMA versions
run: |
touch release-body.md
API_VERS=$(cat driver/API_VERSION)
SCHEMA_VERS=$(cat driver/SCHEMA_VERSION)
echo '!'"[API](https://img.shields.io/badge/API-${API_VERS}-yellow)" >> release-body.md
echo '!'"[SCHEMA](https://img.shields.io/badge/SCHEMA-${SCHEMA_VERS}-yellow)" >> release-body.md
echo "" >> release-body.md
- name: Download matrixes
uses: dawidd6/action-download-artifact@v2
with:
workflow: kernel_tests.yaml
name: matrix_*
name_is_regexp: true
run_id: ${{ github.event.workflow_run.id }}
# Steps:
# Remove everything after the table (ie: since the first line that starts with "# ",
# ie: a markdown section start.
# Remove links to the markdown sections in the table too.
# Then, add a small title to each matrix
# Finally, merge them together
- name: Append matrixes to create release body
run: |
mv matrix_*/*.md .
sed -i -n '/# /q;p' matrix_X64.md
sed -i -n '/# /q;p' matrix_ARM64.md
sed -i 's/\[\(.\)\]([^)]*)/\1/g' matrix_X64.md
sed -i 's/\[\(.\)\]([^)]*)/\1/g' matrix_ARM64.md
sed -i '1s/^/# Driver Testing Matrix amd64\n\n/' matrix_X64.md
sed -i '1s/^/# Driver Testing Matrix arm64\n\n/' matrix_ARM64.md
cat matrix_X64.md matrix_ARM64.md >> release-body.md
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: ./release-body.md
append_body: true
tag_name: ${{ github.event.workflow_run.head_branch }}