Skip to content

build/try automatic version naming #5

build/try automatic version naming

build/try automatic version naming #5

Workflow file for this run

name: Build/release Electron app
on:
pull_request:
branches:
- dev
push:
branches:
- main
tags:
- v*.*.*
jobs:
release:
permissions: write-all
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
working-directory: "./clients/react-app"
run: npm install
- name: build-linux
if: matrix.os == 'ubuntu-latest'
working-directory: "./clients/react-app"
run: |
pwd
id
npm run build:linux
- name: build-win
if: matrix.os == 'windows-latest'
working-directory: "./clients/react-app"
run: npm run build:win
- name: Get version from package.json
id: get-version
run: |
echo ::set-output name=version::$(node -pe "require('./clients/react-app/package.json').version")
working-directory: "./clients/react-app"
- name: release
uses: softprops/action-gh-release@v1
with:
files: |
./clients/react-app/dist/*.exe
./clients/react-app/dist/*.zip
./clients/react-app/dist/*.dmg
./clients/react-app/dist/*.AppImage
./clients/react-app/dist/*.snap
./clients/react-app/dist/*.deb
./clients/react-app/dist/*.rpm
./clients/react-app/dist/*.tar.gz
./clients/react-app/dist/*.yml
./clients/react-app/dist/*.blockmap
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: ${{ steps.get-version.outputs.version }}