Update build work flow #44
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
name: Build PSIs | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node-version: [18] | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
include: | ||
# Define the binary names to use for uploads | ||
- os: windows-latest | ||
file: server.exe | ||
asset_name: server-x64-win.psi | ||
asset_body: "Windows Server Binary" | ||
- os: macos-latest | ||
file: server | ||
asset_name: server-x64-macos.psi | ||
asset_body: "macOS Server Binary" | ||
- os: ubuntu-latest | ||
file: server | ||
asset_name: server-x64-ubuntu.psi | ||
asset_body: "Ubuntu Server Binary" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install dependencies | ||
working-directory: ./PSI | ||
run: npm install | ||
- name: Build PSI Image | ||
working-directory: ./PSI | ||
run: npm run build | ||
- name: Upload binaries to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: "PSI/dist/${{ matrix.file }}" | ||
asset_name: ${{ matrix.asset_name }} | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
body: ${{ matrix.asset_body }} |