Skip to content

Commit 68c8b82

Browse files
committed
Add version to build artifacts
1 parent 128db55 commit 68c8b82

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

.github/workflows/build.yaml

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,50 @@ jobs:
1313
build:
1414
runs-on: secret-vm-build-runner
1515
steps:
16+
- name: Get the version
17+
id: get_version
18+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
1619
- uses: actions/checkout@v4
1720
with:
1821
submodules: recursive
1922
- name: Build
20-
run: scripts/build_reproducible.sh
23+
run: |
24+
scripts/build_reproducible.sh
25+
mv -v artifacts/rootfs-dev{,-${{ steps.get_version.outputs.VERSION }}}.iso
26+
mv -v artifacts/rootfs-prod{,-${{ steps.get_version.outputs.VERSION }}}.iso
27+
mv -v artifacts/rootfs-gpu-dev{,-${{ steps.get_version.outputs.VERSION }}}.iso
28+
mv -v artifacts/rootfs-gpu-prod{,-${{ steps.get_version.outputs.VERSION }}}.iso
29+
mv -v artifacts/ovmf{,-${{ steps.get_version.outputs.VERSION }}}.fd
30+
mv -v artifacts/bzImage{,-${{ steps.get_version.outputs.VERSION }}}
31+
mv -v artifacts/initramfs{,-${{ steps.get_version.outputs.VERSION }}}.cpio.gz
2132
- uses: actions/upload-artifact@v4
2233
with:
23-
name: rootfs-dev.iso
24-
path: artifacts/rootfs-dev.iso
34+
name: rootfs-dev-${{ steps.get_version.outputs.VERSION }}.iso
35+
path: artifacts/rootfs-dev-${{ steps.get_version.outputs.VERSION }}.iso
2536
- uses: actions/upload-artifact@v4
2637
with:
27-
name: rootfs-prod.iso
28-
path: artifacts/rootfs-prod.iso
38+
name: rootfs-prod-${{ steps.get_version.outputs.VERSION }}.iso
39+
path: artifacts/rootfs-prod-${{ steps.get_version.outputs.VERSION }}.iso
2940
- uses: actions/upload-artifact@v4
3041
with:
31-
name: rootfs-gpu-dev.iso
32-
path: artifacts/rootfs-gpu-dev.iso
42+
name: rootfs-gpu-dev-${{ steps.get_version.outputs.VERSION }}.iso
43+
path: artifacts/rootfs-gpu-dev-${{ steps.get_version.outputs.VERSION }}.iso
3344
- uses: actions/upload-artifact@v4
3445
with:
35-
name: rootfs-gpu-prod.iso
36-
path: artifacts/rootfs-gpu-prod.iso
46+
name: rootfs-gpu-prod-${{ steps.get_version.outputs.VERSION }}.iso
47+
path: artifacts/rootfs-gpu-prod-${{ steps.get_version.outputs.VERSION }}.iso
3748
- uses: actions/upload-artifact@v4
3849
with:
39-
name: ovmf.fd
40-
path: artifacts/ovmf.fd
50+
name: ovmf-${{ steps.get_version.outputs.VERSION }}.fd
51+
path: artifacts/ovmf-${{ steps.get_version.outputs.VERSION }}.fd
4152
- uses: actions/upload-artifact@v4
4253
with:
43-
name: bzImage
44-
path: artifacts/bzImage
54+
name: bzImage-${{ steps.get_version.outputs.VERSION }}
55+
path: artifacts/bzImage-${{ steps.get_version.outputs.VERSION }}
4556
- uses: actions/upload-artifact@v4
4657
with:
47-
name: initramfs.cpio.gz
48-
path: artifacts/initramfs.cpio.gz
58+
name: initramfs-${{ steps.get_version.outputs.VERSION }}.cpio.gz
59+
path: artifacts/initramfs-${{ steps.get_version.outputs.VERSION }}.cpio.gz
4960
- name: Release
5061
uses: softprops/action-gh-release@v1
5162
with:

0 commit comments

Comments
 (0)