Ubuntu-24.04 is the version to be used as default in all gh workflows Signed-off-by: Maciej Perkowski <maciej.perkowski@nordicsemi.no>
66 lines
2.1 KiB
YAML
66 lines
2.1 KiB
YAML
name: Create a Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
- '!v*rc*'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: write # to create GitHub release entry
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Get the version
|
|
id: get_version
|
|
run: |
|
|
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
echo "TRIMMED_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
|
|
|
- name: REUSE Compliance Check
|
|
uses: fsfe/reuse-action@bb774aa972c2a89ff34781233d275075cbddf542 # v5.0.0
|
|
with:
|
|
args: spdx -o zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
|
|
|
|
- name: upload-results
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
continue-on-error: true
|
|
with:
|
|
name: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
|
|
path: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
|
|
|
|
- name: Create empty release notes body
|
|
run: |
|
|
echo "TODO: add release overview and notes link" > release-notes.txt
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref }}
|
|
release_name: Zephyr ${{ steps.get_version.outputs.TRIMMED_VERSION }}
|
|
body_path: release-notes.txt
|
|
draft: true
|
|
prerelease: true
|
|
|
|
- name: Upload Release Assets
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
|
|
asset_name: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
|
|
asset_content_type: text/plain
|