Skip to content

Commit

Permalink
Simplify release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-hildebrand committed Dec 29, 2023
1 parent 54ba0fa commit d79bbf6
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

0 comments on commit d79bbf6

Please sign in to comment.