Skip to content

Commit

Permalink
Update build-installer.yml to use Node.js 20 and use inputs for manua…
Browse files Browse the repository at this point in the history
…l release tag
  • Loading branch information
mikiher committed Jan 23, 2024
1 parent 12528ed commit d9b8153
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/build-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ on:
types: [published]
repository: advplyr/audiobookshelf
workflow_dispatch:
inputs:
tag:
description: 'Tag to build'
required: true

jobs:
build-windows:
runs-on: windows-latest

steps:
# 0. Setup steps
- name: Use Node.js 16
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Install pkg globally
run: npm install -g pkg
Expand Down Expand Up @@ -61,7 +65,7 @@ jobs:

# 3. Build the installer
- name: Compile inno setup
run: iscc /DMyAppVersion=${{ steps.get_latest_release.outputs.result }} Setup/installer.iss
run: iscc /DMyAppVersion=${{ github.event_name == 'release' && steps.get_latest_release.outputs.result || inputs.tag }} Setup/installer.iss
working-directory: ./audiobookshelf-windows

# 4. Create a release
Expand All @@ -71,10 +75,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event_name == 'release' && steps.get_latest_release.outputs.result || 'v0.0.0.1' }}
release_name: ${{ github.event_name == 'release' && steps.get_latest_release.outputs.result || 'v0.0.0.1' }}-auto
tag_name: ${{ github.event_name == 'release' && steps.get_latest_release.outputs.result || inputs.tag }}
release_name: ${{ github.event_name == 'release' && steps.get_latest_release.outputs.result || inputs.tag }}-auto
draft: true
prerelease: true
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
Expand All @@ -84,5 +88,5 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./audiobookshelf-windows/Setup/Output/AudiobookshelfInstaller.exe
asset_name: AudiobookshelfInstaller.${{ steps.get_latest_release.outputs.result }}.exe
asset_name: AudiobookshelfInstaller.${{ github.event_name == 'release' && steps.get_latest_release.outputs.result || inputs.tag }}.exe
asset_content_type: application/x-msdownload

0 comments on commit d9b8153

Please sign in to comment.