mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-02-06 07:01:52 +08:00
fix release action
This commit is contained in:
9
.github/actions/upload-release/action.yml
vendored
9
.github/actions/upload-release/action.yml
vendored
@@ -23,8 +23,8 @@ inputs:
|
||||
odrive_api_key:
|
||||
description: 'Key to our release index server'
|
||||
required: true
|
||||
product:
|
||||
description: 'ODrive product name (for firmware releases only).'
|
||||
board:
|
||||
description: 'ODrive board version triplet ("PRODUCT_LINE.VERSION.VARIANT") (for firmware releases only).'
|
||||
required: false
|
||||
app:
|
||||
description: 'Firmware app name (default, bootloader) (for firmware releases only).'
|
||||
@@ -95,6 +95,7 @@ runs:
|
||||
shell: python
|
||||
run: |
|
||||
import asyncio
|
||||
import re
|
||||
import sys
|
||||
|
||||
import aiohttp
|
||||
@@ -115,8 +116,8 @@ runs:
|
||||
release_api = PrivateReleaseApi(api_client)
|
||||
|
||||
qualifiers = {}
|
||||
if '${{ inputs.product }}':
|
||||
qualifiers['product'] = '${{ inputs.product }}'
|
||||
if '${{ inputs.board }}':
|
||||
qualifiers['board'] = tuple(int(i) for i in re.match(r'^([0-9]+)\.([0-9]+).([0-9]+)$', '${{ inputs.board }}').groups())
|
||||
if '${{ inputs.app }}':
|
||||
qualifiers['app'] = '${{ inputs.app }}'
|
||||
if '${{ inputs.variant }}':
|
||||
|
||||
10
.github/workflows/firmware.yaml
vendored
10
.github/workflows/firmware.yaml
vendored
@@ -147,6 +147,14 @@ jobs:
|
||||
mkdir ${{ github.workspace }}/out
|
||||
cp ${{ github.workspace }}/Firmware/build/ODriveFirmware.elf ${{ github.workspace }}/out/firmware.elf
|
||||
|
||||
- name: Parse and format matrix.board_version
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
id: format-board-version
|
||||
run: |
|
||||
formatted_version=$(echo "${{ matrix.board_version }}" | sed 's/v\([0-9]\+\)\.\([0-9]\+\)-\([0-9]\+\)V/\1.\2.\3/')
|
||||
echo "Formatted board version: $formatted_version"
|
||||
echo "::set-output name=formatted_board_version::$formatted_version"
|
||||
|
||||
- name: Upload firmware to ODrive release system
|
||||
if: ${{ steps.release-info.outputs.channel == 'master' && matrix.os == 'ubuntu-latest' && matrix.debug == false && (startsWith(matrix.board_version, 'v3.5-') || startsWith(matrix.board_version, 'v3.6-')) }}
|
||||
uses: ./.github/actions/upload-release
|
||||
@@ -157,7 +165,7 @@ jobs:
|
||||
do_access_key: ${{ secrets.DIGITALOCEAN_ACCESS_KEY }}
|
||||
do_secret_key: ${{ secrets.DIGITALOCEAN_SECRET_KEY }}
|
||||
odrive_api_key: ${{ secrets.ODRIVE_API_KEY }}
|
||||
product: ODrive ${{ matrix.board_version }}
|
||||
board: ${{ steps.format-board-version.outputs.formatted_board_version }}
|
||||
app: default
|
||||
variant: public
|
||||
|
||||
|
||||
Reference in New Issue
Block a user