fix(ci): add missing file

This commit is contained in:
Elian Doran 2025-01-18 21:02:27 +02:00
parent 836bbba7fe
commit ddb42bfe88
No known key found for this signature in database
4 changed files with 41 additions and 3 deletions

View File

@ -0,0 +1,38 @@
inputs:
os:
description: "One of the supported platforms: macos, linux, windows"
required: true
arch:
description: "The architecture to build for: x64, arm64"
required: true
extension:
description: "Platform specific extension to build: dmg, deb, exe"
required: true
runs:
using: composite
steps:
- name: Set up Python for appdmg to be installed
if: ${{ inputs.os == 'macos' }}
run: brew install python-setuptools
- name: Install dependencies
run: npm ci
- name: Update build info
run: npm run update-build-info
- name: Run electron-forge
run: npm run make-electron -- --arch=${{ inputs.arch }}
- name: Prepare artifacts (Unix)
if: inputs.os != 'windows'
run: |
mkdir -p upload
file=$(find out/make -name '*.zip' -print -quit)
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.zip"
file=$(find out/make -name '*.${{ matrix.os.extension }}' -print -quit)
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.${{ matrix.os.extension }}"
- name: Prepare artifacts (Windows)
if: inputs.os == 'windows'
run: |
mkdir upload
$file = Get-ChildItem -Path out/make -Filter '*.zip' -Recurse | Select-Object -First 1
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.zip"
$file = Get-ChildItem -Path out/make -Filter '*.${{ matrix.os.extension }}' -Recurse | Select-Object -First 1
Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.${{ matrix.os.extension }}"

View File

@ -38,7 +38,7 @@ jobs:
with: with:
node-version: 20 node-version: 20
- name: Run the build - name: Run the build
uses: ./.github/actions/build uses: ./.github/actions/build-electron
with: with:
os: ${{ matrix.os.name }} os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}

View File

@ -37,7 +37,7 @@ jobs:
- name: Update nightly version - name: Update nightly version
run: npm run ci-update-nightly-version run: npm run ci-update-nightly-version
- name: Run the build - name: Run the build
uses: ./.github/actions/build uses: ./.github/actions/build-electron
with: with:
os: ${{ matrix.os.name }} os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}

View File

@ -35,7 +35,7 @@ jobs:
with: with:
node-version: 20 node-version: 20
- name: Run the build - name: Run the build
uses: ./.github/actions/build uses: ./.github/actions/build-electron
with: with:
os: ${{ matrix.os.name }} os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}