add GA4 #21
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
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/\"9.9.9\"/\"${VERSION}\"/" package.json | |
env: | |
VERSION: ${{ steps.prep.outputs.version_number }} | |
- name: Rename Version | |
if: matrix.os == 'macos-11' | |
run: | | |
sed -i '' "s/\"9.9.9\"/\"${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 |