Skip to content

Commit 48f5c76

Browse files
committed
fix nightly release; more flexible reusable build
Signed-off-by: Avi Deitcher <[email protected]>
1 parent 9ca54e7 commit 48f5c76

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/build-reusable.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ on:
44
workflow_call:
55
inputs:
66
artifact-name:
7-
description: "Named identifier for the artifact"
8-
required: true
7+
description: "Named identifier for the artifact, optional"
98
type: string
109
os:
1110
description: "OS list"
@@ -166,9 +165,16 @@ jobs:
166165
*)
167166
MODE="elf";;
168167
esac
169-
echo "TOOLCHAIN_NAME=riscv$BITS-$MODE-${{ matrix.os }}-${{ matrix.compiler }}-${{ inputs.artifact-name }}" >> $GITHUB_OUTPUT
168+
ARTIFACT_NAME=${{ inputs.artifact-name }}
169+
if [ -n "$ARTIFACT_NAME" ]; then
170+
ARTIFACT_NAME="-${ARTIFACT_NAME}"
171+
fi
172+
echo "TOOLCHAIN_NAME=riscv$BITS-$MODE-${{ matrix.os }}-${{ matrix.compiler }}${ARTIFACT_NAME}" >> $GITHUB_OUTPUT
170173
174+
- name: Move output to representative name
175+
run: |
176+
mv riscv.tar.xz ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }}.tar.xz
171177
- uses: actions/upload-artifact@v4
172178
with:
173179
name: ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }}
174-
path: riscv.tar.xz
180+
path: ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }}.tar.xz

.github/workflows/nightly-release.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ jobs:
5555
needs: [activity-check]
5656
if: needs.activity-check.outputs.stale != 'true'
5757
uses: ./.github/workflows/build-reusable.yaml
58-
with:
59-
artifact-name: nightly
6058

6159
create-release:
6260
needs: [build]
@@ -65,7 +63,7 @@ jobs:
6563
upload_url: ${{ steps.create_release.outputs.upload_url }}
6664
datestamp: ${{ env.DATESTAMP }}
6765
env:
68-
ARTIFACTS_DIR: /mnt/artifacts/
66+
ARTIFACTS_DIR: artifacts
6967
steps:
7068
- name: Run Configuration Commands
7169
id: metadata
@@ -81,6 +79,7 @@ jobs:
8179
uses: actions/download-artifact@v4
8280
with:
8381
path: ${{ env.ARTIFACTS_DIR }}
82+
merge-multiple: true
8483
- name: List downloaded artifacts
8584
run: |
8685
echo "Contents of ${{ env.ARTIFACTS_DIR }}"

0 commit comments

Comments
 (0)