-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.4 KB
/
createReleaseAction.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build executable for macOS
# Executes every time something is tagged to the main branch
# WARNING: if your DockerHub or GitHub user name contains capital letters
# the image push will fail, since only lower letters are allowed!
on:
push:
tags:
- '*'
jobs:
Release:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: |
npm install
npm install electron-packager -g
npm prune
- name: Build
run: npm run build
- name: Pack for macOS
run: electron-packager . --platform=darwin
- name: zip macOS artifact
run: zip -r totp-manager-macOS.zip totp-manager-darwin-x64/totp-manager.app
- name: Create new release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: Release ${{ github.ref }}
tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload macOS artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: totp-manager-macOS.zip
asset_name: totp-manager_macOS.zip
asset_content_type: application/zip