fix(ci): rpm uses aarch64 & x86_64 as convention, which fails the name matching

This commit is contained in:
Neko Ayaka
2025-10-20 15:31:08 +08:00
parent c1a83fa830
commit de15c9d15c
3 changed files with 166 additions and 22 deletions
+24 -8
View File
@@ -5,6 +5,8 @@ permissions:
env:
BUNDLE_NAME: ''
DEB_BUNDLE_NAME: ''
RPM_BUNDLE_NAME: ''
PRODUCT_NAME: 'AIRI'
VERSION: ''
@@ -141,19 +143,26 @@ jobs:
name: ${{ env.BUNDLE_NAME }}
path: apps/stage-tamagotchi/bundle/${{ env.BUNDLE_NAME }}
- name: Get Linux Artifact Names (Nightly + Linux Only)
if: ${{ github.event_name == 'schedule' && (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm') }}
working-directory: ./apps/stage-tamagotchi
run: |
echo "DEB_BUNDLE_NAME=$(pnpm exec tsx scripts/artifacts-metadata.ts ${{ matrix.target }} --get-filename deb)" >> $GITHUB_ENV
echo "RPM_BUNDLE_NAME=$(pnpm exec tsx scripts/artifacts-metadata.ts ${{ matrix.target }} --get-filename rpm)" >> $GITHUB_ENV
- name: Upload Artifacts (Nightly + Linux deb)
if: ${{ github.event_name == 'schedule' && (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm') }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.deb
path: apps/stage-tamagotchi/bundle/${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.deb
name: ${{ env.DEB_BUNDLE_NAME }}
path: apps/stage-tamagotchi/bundle/${{ env.DEB_BUNDLE_NAME }}
- name: Upload Artifacts (Nightly + Linux rpm)
if: ${{ github.event_name == 'schedule' && (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm') }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.rpm
path: apps/stage-tamagotchi/bundle/${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.rpm
name: ${{ env.RPM_BUNDLE_NAME }}
path: apps/stage-tamagotchi/bundle/${{ env.RPM_BUNDLE_NAME }}
# ---------
# Workflow Dispatch only
@@ -183,6 +192,13 @@ jobs:
run: |
pnpm run -F @proj-airi/stage-tamagotchi rename-artifacts ${{ matrix.target }} --release ${{ !inputs.build_only && !inputs.artifacts_only }} --tag ${{ inputs.tag }} --auto-tag ${{ !inputs.build_only }}
- name: Get Linux Artifact Names (Manual + Non-Release + Linux Only)
if: ${{ github.event_name == 'workflow_dispatch' && !inputs.build_only && inputs.artifacts_only && (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm') }}
working-directory: ./apps/stage-tamagotchi
run: |
echo "DEB_BUNDLE_NAME=$(pnpm exec tsx scripts/artifacts-metadata.ts ${{ matrix.target }} --get-filename deb --release ${{ !inputs.build_only && !inputs.artifacts_only }} --tag ${{ inputs.tag }} --auto-tag ${{ !inputs.build_only }})" >> $GITHUB_ENV
echo "RPM_BUNDLE_NAME=$(pnpm exec tsx scripts/artifacts-metadata.ts ${{ matrix.target }} --get-filename rpm --release ${{ !inputs.build_only && !inputs.artifacts_only }} --tag ${{ inputs.tag }} --auto-tag ${{ !inputs.build_only }})" >> $GITHUB_ENV
- name: Upload Artifacts (Manual + Non-Release + Non-Linux)
if: ${{ github.event_name == 'workflow_dispatch' && !inputs.build_only && inputs.artifacts_only && (matrix.os != 'ubuntu-latest' && matrix.os != 'ubuntu-24.04-arm') }}
uses: actions/upload-artifact@v4
@@ -194,15 +210,15 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' && !inputs.build_only && inputs.artifacts_only && (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm') }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.deb
path: apps/stage-tamagotchi/bundle/${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.deb
name: ${{ env.DEB_BUNDLE_NAME }}
path: apps/stage-tamagotchi/bundle/${{ env.DEB_BUNDLE_NAME }}
- name: Upload Artifacts (Manual + Non-Release + Linux rpm)
if: ${{ github.event_name == 'workflow_dispatch' && !inputs.build_only && inputs.artifacts_only && (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm') }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.rpm
path: apps/stage-tamagotchi/bundle/${{ env.PRODUCT_NAME }}-${{ env.VERSION }}-linux-${{ matrix.arch }}.rpm
name: ${{ env.RPM_BUNDLE_NAME }}
path: apps/stage-tamagotchi/bundle/${{ env.RPM_BUNDLE_NAME }}
- name: Upload To GitHub Releases (Manual + Overwrite Release)
if: ${{ github.event_name == 'workflow_dispatch' && !inputs.build_only && !inputs.artifacts_only }}