-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54ba0fa
commit d79bbf6
Showing
1 changed file
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,17 +30,23 @@ jobs: | |
- run: npm ci | ||
- run: npm test | ||
- run: npm run lint | ||
- name: Get version | ||
id: fungus-version | ||
uses: martinbeentjes/[email protected] | ||
outputs: | ||
version: ${{ steps.fungus-version.outputs.current-version }} | ||
build_release: | ||
if: ${{ inputs.release }} | ||
# TODO | ||
# if: ${{ inputs.release }} | ||
needs: test | ||
runs-on: ${{ matrix.job.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
job: | ||
- { os: macos-12 , artifact-name: fungus-gui-macos } | ||
- { os: windows-2022, artifact-name: fungus-gui-windows } | ||
- { os: ubuntu-22.04, artifact-name: fungus-gui-linux } | ||
- { os: macos-12 , os-name: macos } | ||
- { os: windows-2022, os-name: windows } | ||
- { os: ubuntu-22.04, os-name: linux } | ||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v4 | ||
|
@@ -50,7 +56,10 @@ jobs: | |
node-version: 18.x | ||
cache: 'npm' | ||
- run: npm ci | ||
- name: Install dependency for building dmg | ||
- name: Get artifact name | ||
id: artifact-name | ||
run: echo "NAME=fungus-gui-${{ needs.test.outputs.version }}-${{ matrix.job.os-name }}" >> "$GITHUB_OUTPUT" | ||
- name: Install dependencies for building dmg | ||
if: runner.os == 'macOS' | ||
shell: bash | ||
# https://github.com/actions/runner/issues/2958#issuecomment-1852627308 | ||
|
@@ -59,34 +68,34 @@ jobs: | |
- name: Upload zip artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.job.artifact-name }}-zip | ||
name: ${{ steps.artifact-name.outputs.NAME }} | ||
path: out/make/zip/**/*.zip | ||
if-no-files-found: error | ||
- name: Upload squirrel artifact | ||
if: runner.os == 'Windows' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.job.artifact-name }}-squirrel | ||
name: ${{ steps.artifact-name.outputs.NAME }}-squirrel | ||
path: out/make/squirrel.windows/ | ||
if-no-files-found: error | ||
- name: Upload deb artifact | ||
if: runner.os == 'Linux' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.job.artifact-name }}-deb | ||
path: out/make/deb/ | ||
name: ${{ steps.artifact-name.outputs.NAME }} | ||
path: out/make/deb/x64/fungus-gui_${{ needs.test.outputs.version }}_amd64.deb | ||
if-no-files-found: error | ||
- name: Upload rpm artifact | ||
if: runner.os == 'Linux' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.job.artifact-name }}-rpm | ||
path: out/make/rpm/ | ||
name: ${{ steps.artifact-name.outputs.NAME }} | ||
path: out/make/rpm/x64/fungus-gui-${{ needs.test.outputs.version }}-1.x86_64.rpm | ||
if-no-files-found: error | ||
- name: Upload dmg artifact | ||
if: runner.os == 'macOS' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.job.artifact-name }}-dmg | ||
path: out/make/*.dmg | ||
name: ${{ steps.artifact-name.outputs.NAME }} | ||
path: out/make/fungus-gui-${{ needs.test.outputs.version }}-x64.dmg | ||
if-no-files-found: error |