Skip to content

Commit

Permalink
Add Mac Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SabariVig committed Jul 24, 2021
1 parent f030365 commit 06e4df7
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI/CD Release Linux
name: Linux

on:
release:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/release-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: MacOS

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2

- name: Build and package the app
run: |
npm install
npm run build
npm run package-mac
- name: Get app version
id: package-version
run: |
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
echo ::set-output name=current-version::$PACKAGE_VERSION
shell: bash

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Fluent Reader v${{ steps.package-version.outputs.current-version }}
draft: true
prerelease: false

- name: Upload x64 dmg to release assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/darwin/x64/Fluent Reader-${{ steps.package-version.outputs.current-version }}.dmg
asset_name: Fluent.Reader.Setup.${{ steps.package-version.outputs.current-version }}.x64.dmg
asset_content_type: application/octet-stream
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI/CD Release
name: Windows

on:
push:
Expand Down

0 comments on commit 06e4df7

Please sign in to comment.