Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
hmt committed Feb 6, 2020
1 parent 98d2669 commit e5e2923
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build and release bangbib
on: push
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Node.js, NPM
uses: actions/setup-node@v1
with:
node-version: 13
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build -m
- name: Package
run: npm run package-win
- name: Use WIX
if: matrix.os == 'windows-latest'
run: |
$wixToolsetBinPath = ";C:\Program Files (x86)\WiX Toolset v3.11\bin;"
$env:PATH = $env:PATH + $wixToolsetBinPath
[Environment]::SetEnvironmentVariable("Path", $env:PATH, [EnvironmentVariableTarget]::Machine)
if ((Get-Command "light.exe" -ErrorAction SilentlyContinue) -eq $null)
{
Write-Host "Unable to find light.exe in your PATH"
}
node create-msi.js
env:
AUTHOR: ${{ secrets.AUTHOR }}
UPGRADECODE: ${{ secrets.UPGRADECODE }}
- uses: actions/upload-artifact@v1
with:
name: bangbib.msi
path: "./release/msi/bangbib.msi"
- uses: ncipollo/release-action@v1
with:
artifact: "./release/msi/bangbib.msi"
allowUpdates: true
tag: v1.0.$GITHUB_RUN_NUMBER
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e5e2923

Please sign in to comment.