mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
refactor(ci): deduplicate preparing artifacts
This commit is contained in:
parent
bfdb69292c
commit
836bbba7fe
17
.github/workflows/main.yml
vendored
17
.github/workflows/main.yml
vendored
@ -42,22 +42,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
os: ${{ matrix.os.name }}
|
os: ${{ matrix.os.name }}
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
- name: Prepare artifacts (Unix)
|
extension: ${{ matrix.os.extension }}
|
||||||
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 }}"
|
|
||||||
- name: Publish artifacts
|
- name: Publish artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
17
.github/workflows/nightly.yml
vendored
17
.github/workflows/nightly.yml
vendored
@ -41,22 +41,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
os: ${{ matrix.os.name }}
|
os: ${{ matrix.os.name }}
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
- name: Prepare artifacts (Unix)
|
extension: ${{ matrix.os.extension }}
|
||||||
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 }}"
|
|
||||||
- name: Publish artifacts
|
- name: Publish artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
@ -38,23 +38,8 @@ jobs:
|
|||||||
uses: ./.github/actions/build
|
uses: ./.github/actions/build
|
||||||
with:
|
with:
|
||||||
os: ${{ matrix.os.name }}
|
os: ${{ matrix.os.name }}
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
- name: Prepare artifacts (Unix)
|
extension: ${{ matrix.os.extension }}
|
||||||
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 }}"
|
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user