chore(ci): improved, structure, fix artifact not found issue.
This commit is contained in:
@@ -170,6 +170,9 @@ jobs:
|
||||
# [^2]: https://huggingface.github.io/candle/guide/installation.html
|
||||
CUDA_COMPUTE_CAP: '75'
|
||||
|
||||
# ---------
|
||||
# Nightly (schedule) builds only
|
||||
# ---------
|
||||
- name: Get Name of Artifacts (Nightly + Windows Only)
|
||||
if: ${{ github.event_name == 'schedule' && matrix.os == 'windows-latest' }}
|
||||
run: |
|
||||
@@ -187,28 +190,6 @@ jobs:
|
||||
run:
|
||||
pnpm run -F @proj-airi/stage-tamagotchi rename-artifacts ${{ matrix.target }}
|
||||
|
||||
- name: Get Name of Artifacts (Manual + Windows Only)
|
||||
if: ${{ github.event_name == 'workflow_dispatch' && matrix.os == 'windows-latest' }}
|
||||
run: |
|
||||
pnpm -F @proj-airi/stage-tamagotchi name-of-artifacts ${{ matrix.target }} --out bundle_name
|
||||
echo "BUNDLE_NAME=$(node -p "require('node:fs').readFileSync(require('node:path').join('apps', 'stage-tamagotchi', 'bundle_name')).toString('utf-8')")" >> $env:GITHUB_ENV
|
||||
|
||||
- name: Get Name of Artifacts (Manual)
|
||||
if: ${{ github.event_name == 'workflow_dispatch' && matrix.os != 'windows-latest' }}
|
||||
run: |
|
||||
pnpm -F @proj-airi/stage-tamagotchi name-of-artifacts ${{ matrix.target }} --out bundle_name
|
||||
echo "BUNDLE_NAME=$(node -p "require('node:fs').readFileSync(require('node:path').join('apps', 'stage-tamagotchi', 'bundle_name')).toString('utf-8')")" >> $GITHUB_ENV
|
||||
|
||||
- name: Rename Artifacts (Manual)
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
run: |
|
||||
pnpm run -F @proj-airi/stage-tamagotchi rename-artifacts ${{ matrix.target }} --release --tag ${{ inputs.tag }} --auto-tag
|
||||
|
||||
- name: Rename Artifacts (Automatic)
|
||||
if: ${{ github.event_name == 'release' }}
|
||||
run: |
|
||||
pnpm run -F @proj-airi/stage-tamagotchi rename-artifacts ${{ matrix.target }} --release
|
||||
|
||||
- name: Upload Artifacts (Nightly)
|
||||
if: ${{ github.event_name == 'schedule' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -216,6 +197,27 @@ jobs:
|
||||
name: ${{ env.BUNDLE_NAME }}
|
||||
path: bundle/${{ env.BUNDLE_NAME }}
|
||||
|
||||
# ---------
|
||||
# Workflow Dispatch only
|
||||
# ---------
|
||||
|
||||
- name: Get Name of Artifacts (Manual + Windows Only)
|
||||
if: ${{ github.event_name == 'workflow_dispatch' && matrix.os == 'windows-latest' }}
|
||||
run: |
|
||||
pnpm -F @proj-airi/stage-tamagotchi name-of-artifacts ${{ matrix.target }} --out bundle_name --release ${{ !inputs.build_only && !inputs.artifacts_only }} --tag ${{ inputs.tag }} --auto-tag ${{ !inputs.build_only }}
|
||||
echo "BUNDLE_NAME=$(node -p "require('node:fs').readFileSync(require('node:path').join('apps', 'stage-tamagotchi', 'bundle_name')).toString('utf-8')")" >> $env:GITHUB_ENV
|
||||
|
||||
- name: Get Name of Artifacts (Manual)
|
||||
if: ${{ github.event_name == 'workflow_dispatch' && matrix.os != 'windows-latest' }}
|
||||
run: |
|
||||
pnpm -F @proj-airi/stage-tamagotchi name-of-artifacts ${{ matrix.target }} --out bundle_name --release ${{ !inputs.build_only && !inputs.artifacts_only }} --tag ${{ inputs.tag }} --auto-tag ${{ !inputs.build_only }}
|
||||
echo "BUNDLE_NAME=$(node -p "require('node:fs').readFileSync(require('node:path').join('apps', 'stage-tamagotchi', 'bundle_name')).toString('utf-8')")" >> $GITHUB_ENV
|
||||
|
||||
- name: Rename Artifacts (Manual)
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
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: Upload Artifacts (Manual + Non-Release)
|
||||
if: ${{ github.event_name == 'workflow_dispatch' && !inputs.build_only && inputs.artifacts_only }}
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -223,7 +225,7 @@ jobs:
|
||||
name: ${{ env.BUNDLE_NAME }}
|
||||
path: bundle/${{ env.BUNDLE_NAME }}
|
||||
|
||||
- name: Upload To GitHub Releases (Manual + Release)
|
||||
- name: Upload To GitHub Releases (Manual + Overwrite Release)
|
||||
if: ${{ github.event_name == 'workflow_dispatch' && !inputs.build_only && !inputs.artifacts_only }}
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
@@ -231,6 +233,15 @@ jobs:
|
||||
append_body: true
|
||||
tag_name: ${{ inputs.tag }}
|
||||
|
||||
# ---------
|
||||
# Version push
|
||||
# ---------
|
||||
|
||||
- name: Rename Artifacts (Automatic)
|
||||
if: ${{ github.event_name == 'release' }}
|
||||
run: |
|
||||
pnpm run -F @proj-airi/stage-tamagotchi rename-artifacts ${{ matrix.target }} --release
|
||||
|
||||
- name: Upload To GitHub Releases (Automatic)
|
||||
if: ${{ github.event_name == 'release' }}
|
||||
uses: softprops/action-gh-release@v2
|
||||
|
||||
Reference in New Issue
Block a user