Skip to content

Build your personal knowledge base with Trilium Notes

refactor(ci): deduplicate preparing artifacts

Elian Doran836bbba7feca
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 362f3d1b41..8610346aad 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -42,22 +42,7 @@ jobs:
with:
os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }}
- - name: Prepare artifacts (Unix)
- if: runner.os != 'windows'
- run: |
- mkdir -p upload
- file=$(find out/make -name '*.zip' -print -quit)
- cp "$file" "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-${{ github.ref_name }}.zip"
- file=$(find out/make -name '*.${{ matrix.os.extension }}' -print -quit)
- cp "$file" "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-${{ github.ref_name }}.${{ matrix.os.extension }}"
- - name: Prepare artifacts (Windows)
- if: runner.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-${{ matrix.os.name }}-${{ matrix.arch }}-${{ github.ref_name }}.zip"
- $file = Get-ChildItem -Path out/make -Filter '*.${{ matrix.os.extension }}' -Recurse | Select-Object -First 1
- Copy-Item -Path $file.FullName -Destination "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}-${{ github.ref_name }}.${{ matrix.os.extension }}"
+ extension: ${{ matrix.os.extension }}
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 2e14884f31..81c21aefad 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -41,22 +41,7 @@ jobs:
with:
os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }}
- - name: Prepare artifacts (Unix)
- if: runner.os != 'windows'
- run: |
- mkdir -p upload
- file=$(find out/make -name '*.zip' -print -quit)
- cp "$file" "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.zip"
- file=$(find out/make -name '*.${{ matrix.os.extension }}' -print -quit)
- cp "$file" "upload/TriliumNextNotes-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }}"
- - name: Prepare artifacts (Windows)
- if: runner.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-${{ matrix.os.name }}-${{ matrix.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-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }}"
+ extension: ${{ matrix.os.extension }}
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5f2e82e149..aba519fcd5 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -38,23 +38,8 @@ jobs:
uses: ./.github/actions/build
with:
os: ${{ matrix.os.name }}
- arch: ${{ matrix.arch }}
- - name: Prepare artifacts (Unix)
- if: runner.os != 'windows'
- run: |
- mkdir -p upload
- file=$(find out/make -name '*.zip' -print -quit)
- cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ matrix.os.name }}-${{ matrix.arch }}.zip"
- file=$(find out/make -name '*.${{ matrix.os.extension }}' -print -quit)
- cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }}"
- - name: Prepare artifacts (Windows)
- if: runner.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 }}-${{ matrix.os.name }}-${{ matrix.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 }}-${{ matrix.os.name }}-${{ matrix.arch }}.${{ matrix.os.extension }}"
+ arch: ${{ matrix.arch }}
+ extension: ${{ matrix.os.extension }}
- name: Publish release
uses: softprops/action-gh-release@v2
with: