2021-01-29 18:12:30 +01:00
|
|
|
name: Create a Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
2022-10-03 12:18:18 +02:00
|
|
|
- '!v*rc*'
|
2021-01-29 18:12:30 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
2023-03-18 11:11:12 +01:00
|
|
|
runs-on: ubuntu-22.04
|
2021-01-29 18:12:30 +01:00
|
|
|
steps:
|
2022-10-13 19:48:20 +02:00
|
|
|
- uses: actions/checkout@v3
|
2021-01-29 18:12:30 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Get the version
|
|
|
|
id: get_version
|
2022-10-13 19:36:42 +02:00
|
|
|
run: |
|
|
|
|
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
2022-10-03 12:54:17 +02:00
|
|
|
echo "TRIMMED_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
2021-01-29 18:12:30 +01:00
|
|
|
|
|
|
|
- name: REUSE Compliance Check
|
|
|
|
uses: fsfe/reuse-action@v1
|
|
|
|
with:
|
|
|
|
args: spdx -o zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
|
|
|
|
|
|
|
|
- name: upload-results
|
2022-08-22 19:14:44 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2023-01-03 12:23:56 +01:00
|
|
|
continue-on-error: true
|
2021-01-29 18:12:30 +01:00
|
|
|
with:
|
|
|
|
name: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
|
|
|
|
path: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
|
|
|
|
|
2022-10-03 12:29:40 +02:00
|
|
|
- name: Create empty release notes body
|
2021-01-29 18:12:30 +01:00
|
|
|
run: |
|
2022-10-03 12:29:40 +02:00
|
|
|
echo "TODO: add release overview and notes link" > release-notes.txt
|
2021-01-29 18:12:30 +01:00
|
|
|
|
|
|
|
- name: Create Release
|
|
|
|
id: create_release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.ref }}
|
2022-10-03 12:54:17 +02:00
|
|
|
release_name: Zephyr ${{ steps.get_version.outputs.TRIMMED_VERSION }}
|
2021-01-29 18:12:30 +01:00
|
|
|
body_path: release-notes.txt
|
|
|
|
draft: true
|
|
|
|
prerelease: true
|
|
|
|
|
|
|
|
- name: Upload Release Assets
|
|
|
|
id: upload-release-asset
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
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
|