mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2026-02-06 10:41:44 +08:00
AutoRelease + Header Checker Upgrades (#482)
* Initial version where all deps are pylibs * mechanism for undoing an autorelease * misc refactor touchups * +mechanism to baseline older commit into detached HEAD tag * decouple kernel check configs + misc refactor improvements * improved compatibility with git action * Get pushes working in git action with release * Fix header-check issue when same deletion occurs in parallel * Add help message in case check fails * Address PR feedback
This commit is contained in:
51
.github/workflows/auto-release.yml
vendored
Normal file
51
.github/workflows/auto-release.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: Auto-Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
commit_id:
|
||||
description: 'Commit ID'
|
||||
required: true
|
||||
default: 'HEAD'
|
||||
version_number:
|
||||
description: 'Version Number (Ex. 202000.00)'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
auto-release:
|
||||
name: Auto Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Tool Setup
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8.5
|
||||
architecture: x64
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Source the release tools from FreeRTOS/FreeRTOS
|
||||
- name: Checkout FreeRTOS Release Tools
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: tools
|
||||
|
||||
# Simpler git auth if we use checkout action and forward the repo to release script
|
||||
- name: Checkout FreeRTOS
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: local_core
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Release
|
||||
run: |
|
||||
# Configure repo for push
|
||||
git config --global user.name ${{ github.actor }}
|
||||
git config --global user.email ${{ github.actor }}@users.noreply.github.com
|
||||
|
||||
# Run the release script
|
||||
pip install -r ./tools/.github/scripts/release-requirements.txt
|
||||
./tools/.github/scripts/release.py FreeRTOS --core-repo-path=local_core --core-commit=${{ github.event.inputs.commit_id }} --new-core-version=${{ github.event.inputs.version_number }}
|
||||
exit $?
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,10 +1,10 @@
|
||||
name: FreeRTOS-Header-Checker
|
||||
name: Core-Checker
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
header-checker:
|
||||
name: File Header Checks
|
||||
core-checker:
|
||||
name: FreeRTOS Core Checks
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Install python 3
|
||||
@@ -40,6 +40,7 @@ jobs:
|
||||
- name: Check File Headers
|
||||
run: |
|
||||
cd inspect
|
||||
../tools/.github/scripts/check-header.py --json ${HOME}/files_modified.json ${HOME}/files_added.json ${HOME}/files_renamed.json
|
||||
export PYTHONPATH=tools/.github/scripts:${PYTHONPATH}
|
||||
.github/scripts/core_checker.py --json ${HOME}/files_modified.json ${HOME}/files_added.json ${HOME}/files_renamed.json
|
||||
exit $?
|
||||
|
||||
62
.github/workflows/release-packager.yml
vendored
62
.github/workflows/release-packager.yml
vendored
@@ -1,62 +0,0 @@
|
||||
name: FreeRTOS-Release-Packager
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
commit_id:
|
||||
description: 'Commit ID'
|
||||
required: true
|
||||
version_number:
|
||||
description: 'Version Number (Ex. 10.4.1)'
|
||||
required: true
|
||||
default: '10.4.1'
|
||||
|
||||
jobs:
|
||||
release-packager:
|
||||
name: Release Packager
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Need a separate copy to fetch packing tools, as source FreeRTOS dir will be pruned and operated on
|
||||
- name: Checkout FreeRTOS Tools
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: master
|
||||
path: tools
|
||||
|
||||
# Setup packing tools
|
||||
- name: Tool Setup
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8.5
|
||||
architecture: x64
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Packaging
|
||||
- name: Packaging
|
||||
run: python tools/.github/scripts/freertos_zipper.py --freertos-commit ${{ github.event.inputs.commit_id }} --zip-version ${{ github.event.inputs.version_number }}
|
||||
|
||||
# Create release endpoint
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: V${{ github.event.inputs.version_number }}
|
||||
release_name: FreeRTOS Release V${{ github.event.inputs.version_number }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
commitish: ${{ github.event.inputs.commit_id }}
|
||||
|
||||
# Upload release assets the recently created endpoint
|
||||
- name: Upload Release
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./FreeRTOSv${{ github.event.inputs.version_number }}.zip
|
||||
asset_name: FreeRTOSv${{ github.event.inputs.version_number }}.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
Reference in New Issue
Block a user