Skip to content

init code

init code #14

Workflow file for this run

name: Deploy::App
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
deploy:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-11 ]
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- id: prep
uses: hocgin/action-env@main
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Rename Version
if: matrix.os == 'ubuntu-latest'
run: |
sed -i "s/\"1.0.0\"/\"${VERSION}\"/" package.json
env:
VERSION: ${{ steps.prep.outputs.version_number }}
- name: Rename Version
if: matrix.os == 'macos-11'
run: |
sed -i '' "s/\"1.0.0\"/\"${VERSION}\"/" package.json
env:
VERSION: ${{ steps.prep.outputs.version_number }}
- run: npm install
- run: npm run package
- run: |
zip -r Kimi-$OS-arm64.zip out/Kimi-*-arm64
env:
OS: ${{ matrix.os }}
- run: |
zip -r Kimi-$OS-x64.zip out/Kimi-*-x64
env:
OS: ${{ matrix.os }}
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
- name: Upload Release darwin-arm64.zip Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Kimi-${{ matrix.os }}-arm64.zip
asset_name: Kimi-${{ matrix.os }}-arm64.zip
asset_content_type: application/zip
- name: Upload Release darwin-x64.zip Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Kimi-${{ matrix.os }}-x64.zip
asset_name: Kimi-${{ matrix.os }}-x64.zip
asset_content_type: application/zip