update #179
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: Release ioPay Desktop | |
# Controls when the action will run. Triggers the workflow on push | |
# events but only for the tags | |
on: | |
# release: | |
# types: [published] | |
push: | |
tags: | |
- "v*.*.*" | |
# for testing. will delete when check in | |
# pull_request: | |
# branches: [master] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
name: Create Release | |
# The type of runner that the job will run on | |
runs-on: macos-11 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "10" | |
- name: Cache Node.js modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm install | |
- name: Install depenedencies in electron | |
run: | | |
cd src/electron/ | |
npm install | |
- name: Build | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npm run build | |
cd src/electron/ | |
CSC_LINK=${{secrets.CERT_FILE}} CSC_KEY_PASSWORD=${{secrets.CERT_PASS}} APPLEID=${{secrets.APPLE_ID}} APPLEIDPASS=${{secrets.APPLE_PASS}} npm run build | |
- name: upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: iopay-desktop-release | |
path: src/electron/dist/* | |
- name: Upload builds to release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: src/electron/dist/* | |
draft: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Install aws cmd | |
- uses: chrislennon/[email protected] | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
# Upload use aws command | |
- name: Upload build to s3 | |
run: | | |
cd src/electron/dist/ | |
for file in *.exe *.snap *.dmg | |
do | |
mv "$file" `echo $file | tr ' ' '.'` | |
done | |
for file in *.exe *.snap *.dmg | |
do | |
aws --endpoint-url="${S3_ENDPOINT}" s3 cp $file s3://${S3_BUCKET}/ | |
done | |
env: | |
S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }} |