Skip to content

Commit

Permalink
ci: fix default upload-artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Jan 2, 2025
1 parent 2b9af8d commit ef4df08
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ on:
workflow_dispatch:
inputs:
upload-artifacts:
type: boolean
default: false
type: string
default: 'NO'
artifacts-retention-days:
type: number
default: 1
workflow_call:
inputs:
upload-artifacts:
type: boolean
default: false
type: string
default: 'YES'
artifacts-retention-days:
type: number
default: 3
Expand All @@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
submodules: "true"
- name: node_modules cache
uses: actions/[email protected]
with:
Expand All @@ -46,7 +46,7 @@ jobs:
bash ./scripts/prepare-linux.sh
bash ./scripts/build-linux.sh
- name: Upload build artifacts
if: inputs.upload-artifacts == 'true'
if: github.event.inputs.upload-artifacts == 'YES' || inputs.upload-artifacts == 'YES'
uses: actions/upload-artifact@v4
with:
name: bin-linux-x86_64
Expand All @@ -58,7 +58,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
submodules: "true"
- name: node_modules cache
uses: actions/[email protected]
with:
Expand All @@ -72,7 +72,7 @@ jobs:
- uses: actions/[email protected]
with:
node-version: 20
cache: 'yarn'
cache: "yarn"
- name: Install dependencies
run: yarn install
- name: Setup QEMU
Expand All @@ -89,7 +89,7 @@ jobs:
arm64v8/ubuntu:latest \
bash -c "./scripts/prepare-linux.sh && ./scripts/build-linux.sh"
- name: Upload build artifacts
if: inputs.upload-artifacts == 'true'
if: github.event.inputs.upload-artifacts == 'YES' || inputs.upload-artifacts == 'YES'
uses: actions/upload-artifact@v4
with:
name: bin-linux-arm64
Expand All @@ -104,7 +104,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
submodules: "true"
- name: node_modules cache
uses: actions/[email protected]
with:
Expand All @@ -118,13 +118,13 @@ jobs:
- uses: actions/[email protected]
with:
node-version: 20
cache: 'yarn'
cache: "yarn"
- name: Install dependencies
run: yarn install
- name: Build (macOS)
run: bash ./scripts/build-macos.sh
- name: Upload build artifacts
if: inputs.upload-artifacts == 'true'
if: github.event.inputs.upload-artifacts == 'YES' || inputs.upload-artifacts == 'YES'
uses: actions/upload-artifact@v4
with:
name: bin-${{ matrix.os }}
Expand All @@ -136,7 +136,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
submodules: "true"
- name: node_modules cache
uses: actions/[email protected]
with:
Expand All @@ -150,15 +150,15 @@ jobs:
- uses: actions/[email protected]
with:
node-version: 20
cache: 'yarn'
cache: "yarn"
- name: Install dependencies
run: yarn install
- name: Prepare & build
run: |
powershell ./scripts/prepare-windows.ps1
powershell ./scripts/build-windows.ps1
- name: Upload build artifacts
if: inputs.upload-artifacts == 'true'
if: github.event.inputs.upload-artifacts == 'YES' || inputs.upload-artifacts == 'YES'
uses: actions/upload-artifact@v4
with:
name: bin-windows
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
jobs:
build:
uses: ./.github/workflows/build-release.yml
with:
upload-artifacts: true
artifacts-retention-days: 3
publish:
permissions:
contents: write
Expand Down

0 comments on commit ef4df08

Please sign in to comment.