Skip to content

Commit

Permalink
GITHUB: nsis.yml - workflow to listen to pushes on Main branch and tr…
Browse files Browse the repository at this point in the history
…igger NSIS compiler.

Enumerates *.nsi files within the windows installer directory and attempts to run  on them.

Signed-off-by: Nick Boyd <[email protected]>
  • Loading branch information
Minothor committed Apr 9, 2023
1 parent 4b19710 commit 59d51d5
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/nsis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: nsis

on:
workflow_run:
workflows: [ Build ]
types: [ completed ]
workflow_dispatch:

jobs:
config:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.files.outputs.matrix }}
branch: ${{ steps.branch-ref.outputs.name }}
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.event.workflow_run.head_branch }}

- name: Return Branch
id: branch-ref
run: echo "::set-output name=${{ github.event.workflow_run.head_branch }}"

- name: Get Script Files
id: list-files
uses: Rishabh510/Path-lister-action@master
with:
path: installers/
type: .nsi

- name: Return Script Files
id: files
run: echo "::set-output name=matrix::$(echo "${{ steps.list-files.outputs.paths }}" | sed 's/\//\\/g' | jq --raw-input --compact-output '[splits(" ") | select(length > 0)]')"

make-installer:
runs-on: windows-latest
needs: [ config ]
strategy:
fail-fast: false
matrix:
file: ${{ fromJson(needs.config.outputs.matrix) }}
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.event.workflow_run.head_branch }}

- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: success
name: hobovr-build-windows-latest
path: ${{ github.workspace }}

- name: Create nsis installer
id: create-installer
shell: powershell
run: |
"$CONDA\bin\conda.bat execute ${{ matrix.file }}"
working-directory: ${{ github.workspace }}\installers\win

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: "hobovr_setup.exe" # Get the Output Name
path: |
hobovr

0 comments on commit 59d51d5

Please sign in to comment.