Skip to content

Commit

Permalink
Merge pull request #24 from cryptogarageinc/develop
Browse files Browse the repository at this point in the history
fix: CI
  • Loading branch information
k-matsuzawa authored Sep 2, 2021
2 parents a1100b4 + ef64da8 commit 7620f62
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 27 deletions.
76 changes: 57 additions & 19 deletions .github/workflows/package-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: CI

on:
push:
branches:
- master
tags:
- 'v*'

# 環境変数の説明

Expand All @@ -23,21 +23,63 @@ on:
# NODE_VERSION:
# description: "パッケージング時のnodeバージョン"

env:
NODE_VERSION: 14.17.0

jobs:
create_releases:
name: create-releases
runs-on: ubuntu-18.04
outputs:
release_url: ${{ steps.output_url.outputs.upload_url }}

steps:
- name: checkout
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
- First Change
- Second Change
draft: false
prerelease: true
continue-on-error: true
- name: Get release
if: steps.create_release.outcome == 'failure'
id: get_release
uses: bruceadams/get-release@v1.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: output url
id: output_url
run: |
echo "::set-output name=upload_url::${{steps.get_release.outputs.upload_url}}${{steps.create_release.outputs.upload_url}}"
build-on-mac:
# 環境情報: https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md
runs-on: macos-latest
runs-on: macos-10.15
needs: create_releases
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
NODE_VERSION: 14.17.0
steps:
- uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v2
timeout-minutes: 1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache node modules
Expand All @@ -51,26 +93,25 @@ jobs:
${{ runner.os }}--${{ env.cache-name }}-
- name: Install node modules
run: yarn
- name: pull git tag
run: git pull --tags
- name: Package app
run: yarn release
run: yarn release --mac --x64

build-on-win:
# 環境情報: https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md
runs-on: windows-latest
runs-on: windows-2019
needs: create_releases
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_VERSION: 14.17.0
steps:
- uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v2
timeout-minutes: 1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set bash env
run: |
echo "::add-path::/c/Program Files/Git/mingw64/libexec/git-core"
- name: Cache node modules
uses: actions/cache@v1
env:
Expand All @@ -82,9 +123,6 @@ jobs:
${{ runner.os }}--${{ env.cache-name }}-
- name: Install node modules
run: yarn
- name: pull git tag
shell: bash
run: git pull --tags
- name: Build app
- name: Package app
shell: bash
run: yarn release
run: yarn release --win --x64
14 changes: 7 additions & 7 deletions electron-builder.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
appId: io.settlenet.xpubviewer
productName: XpubViewer
copyright: "Copyright © 2020 Crypto Garage, Inc. All Rights Reserved."
copyright: "Copyright © 2021 Crypto Garage, Inc. All Rights Reserved."

directories:
output: dist
Expand Down Expand Up @@ -28,20 +28,20 @@ mac:
gatekeeperAssess: false
entitlements: "dev_script/package/notarize/entitlements.mac.plist"
entitlementsInherit: "dev_script/package/notarize/entitlements.mac.plist"
publish:
provider: "github"
private: true

win:
target:
- zip
- nsis
publish:
provider: "github"
private: true

nsis:
createDesktopShortcut: true
createStartMenuShortcut: true

publish:
provider: "github"
releaseType: "release"
vPrefixedTagName: true
owner: "cryptogarageinc"

extends: null
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "electron .",
"postinstall": "electron-builder install-app-deps",
"electron_build": "node ./dev_script/build.js",
"release": "node ./dev_script/build.js",
"release": "yarn electron-builder --config electron-builder.yml",
"appVersion": "node ./dev_script/appVersion.js"
},
"repository": "https://github.com/cryptogarageinc/ledger-liquid-xpubkey-viewer",
Expand Down

0 comments on commit 7620f62

Please sign in to comment.