Skip to content

update pkg

update pkg #102

name: Build and release
on:
push:
tags:
- 'v*'
paths-ignore:
- 'README.md'
- 'CHANGE.md'
- 'doc/*'
- '.github/*'
jobs:
create-release:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.tag }}
release_name: OpenBlock Desktop ${{ steps.tag.outputs.tag }}
body: |
## Change Log (en)
- **New feature**
1. Feature 1.
2. Feature 2.
- **Fix bug**
1. Bug 1.
2. Bug 2.
## 更改日志 (zh-cn)
- **新功能**
1. 功能1。
2. 功能2。
- **修复错误**
1. 错误1。
2. 错误2。
draft: true
prerelease: false
build-windows:
needs: create-release
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Npm Install
run: |
npm ci
- name: Build and Publish
env:
GA_ID: ${{ secrets.GA_ID }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_ENV: production
NODE_OPTIONS: --max_old_space_size=4096
run: npm run publish
build-mac:
needs: create-release
runs-on: macos-13
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Npm Install
run: |
pip install setuptools
npm ci
- name: Build and Publish
env:
GA_ID: ${{ secrets.GA_ID }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_ENV: production
NODE_OPTIONS: --max_old_space_size=8192
CSC_IDENTITY_AUTO_DISCOVERY: false
run: npm run publish
build-linux:
needs: create-release
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Npm Install
run: npm ci
- name: Build and Publish
env:
GA_ID: ${{ secrets.GA_ID }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_ENV: production
NODE_OPTIONS: --max_old_space_size=8192
CSC_IDENTITY_AUTO_DISCOVERY: false
run: npm run publish