v2.2.1 #14
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
# Workflow to build on each commit and create a release on tags | |
name: main | |
# Controls when the workflow will run | |
# Triggers the workflow on push or pull request events | |
on: [push, pull_request, workflow_dispatch] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# Linux and windows build, MacOS build is not supported on a Linux host | |
linux: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
# Install nodejs + npm | |
- uses: actions/setup-node@v3 | |
- name: Install wine | |
run: | | |
sudo dpkg --add-architecture i386 | |
sudo apt-get update | |
sudo apt-get install -y wine wine32 | |
# Build the application | |
- name: Build | |
run: | | |
npm install | |
npm run dist:lin | |
npm run dist:win | |
- name: Upload Built Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
# Artifact name | |
name: "PTree-linux" # optional, default is artifact | |
# A file, directory or wildcard pattern that describes what to upload | |
path: | | |
bin/PTree-linux.zip | |
bin/PTree-windows.zip | |
# Uncomment for artifact publishing on tags | |
# - name: Publish | |
# uses: softprops/action-gh-release@v1 | |
# if: startsWith(github.ref, 'refs/tags/') | |
# with: | |
# files: | | |
# bin/PTree-linux.zip | |
# bin/PTree-windows.zip | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |