Skip to content

updated release action #4

updated release action

updated release action #4

Workflow file for this run

name: Build and Release
on:
push:
branches:
- master
paths:
- 'package.json'
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Read Node.js version from package.json
id: node_version
run: echo "NODE_VERSION=$(node -p "require('./package.json').engines.node")" >> $GITHUB_ENV
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies
run: npm install --verbose
- name: Build Electron App
run: npm run build --verbose
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get Version from package.json
id: package_version
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: Create and Upload Release
uses: ncipollo/release-action@v1
with:
artifacts: "./dist/Menu Barmaid-${{ env.VERSION }}.dmg"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.VERSION }}
name: Release ${{ env.VERSION }}