Skip to content

Commit cf34b9d

Browse files
mrpollodagar
authored andcommitted
ci: fixes tag uploads and container tagging
1 parent 0fca8e3 commit cf34b9d

File tree

1 file changed

+8
-28
lines changed

1 file changed

+8
-28
lines changed

.github/workflows/build_all_targets.yml

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
name: Build all targets
77

88
on:
9-
workflow_dispatch:
10-
inputs:
11-
tag:
12-
required: true
13-
description: release version
149
push:
1510
tags:
1611
- 'v*'
@@ -51,26 +46,15 @@ jobs:
5146
- id: set-timestamp
5247
run: echo "::set-output name=timestamp::$(date +"%Y%m%d%H%M%S")"
5348

54-
# This job is also triggered with versioned tags
55-
# Creating a and pushing a tag starting with "v" just as "v1.0.0"
56-
# will trigger this workflow and when all builds are done create a Github Release
57-
# then it will upload all binaries built as assets
58-
# Additionally, we can also trigger this step manually
59-
# From the Github Actions tab for this repository:
60-
# https://github.com/PX4/PX4-Autopilot/actions/workflows/build_all_targets.yml
61-
# You can now click a "Run Workflow" button that will prompt you for a tag name
62-
# This tag name has to match an existing tag otherwise the new release will be detached
63-
# Note: Only developers with "write" permission to the repository can use this feature
64-
- id: set-tag
65-
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
66-
run: echo "::set-output name=tagname::${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}"
67-
6849
- id: set-branch
6950
run: echo "::set-output name=branchname::${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
7051

7152
- name: Debug Matrix Output
7253
if: runner.debug == '1'
73-
run: echo "$(./Tools/ci/generate_board_targets_json.py --group --verbose)"
54+
run: |
55+
echo "${{ steps.set-timestamp.outputs.timestamp }}"
56+
echo "${{ steps.set-branch.outputs.branchname }}"
57+
echo "$(./Tools/ci/generate_board_targets_json.py --group --verbose)"
7458
7559
setup:
7660
name: Build Group [${{ matrix.group }}]
@@ -159,20 +143,16 @@ jobs:
159143
# runs-on: ubuntu-latest
160144
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
161145
needs: [setup, group_targets]
162-
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
146+
if: startsWith(github.ref, 'refs/tags/v')
163147
steps:
164148
- name: Download Artifacts
165149
uses: actions/download-artifact@v4
166-
167-
- name: Arrange Binaries
168-
run: |
169-
mkdir artifacts
170-
cp **/**/*.px4 artifacts/
150+
with:
151+
path: artifacts/
152+
merge-multiple: true
171153

172154
- name: Upload Binaries to Release
173155
uses: softprops/action-gh-release@v2
174156
with:
175-
name: ${{ needs.group_targets.outputs.tagname }}
176-
tag_name: ${{ needs.group_targets.outputs.tagname }}
177157
draft: true
178158
files: artifacts/*.px4

0 commit comments

Comments
 (0)