-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from jumpserver/pr@dev@perf_support_win32
perf: 支持 windows x86 架构
- Loading branch information
Showing
3 changed files
with
97 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
name: Create Release And Upload assets | ||
|
||
jobs: | ||
create-realese: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
steps: | ||
- name: Install Dependencies | ||
run: | | ||
sudo dpkg --add-architecture i386 | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential wine wine32 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Get version | ||
id: get_version | ||
run: | | ||
TAG=$(basename ${GITHUB_REF}) | ||
echo "::set-output name=TAG::$TAG" | ||
- name: Create Release | ||
id: create_release | ||
uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
config-name: release-config.yml | ||
version: ${{ steps.get_version.outputs.TAG }} | ||
tag: ${{ steps.get_version.outputs.TAG }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.20' | ||
- name: Build Application | ||
run: | | ||
yarn install | ||
yarn build | ||
- name: Release Upload Assets | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
draft: true | ||
files: | | ||
build/*.exe |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM node:16.20-bullseye-slim as as stage-build | ||
ARG TARGETARCH | ||
|
||
ARG DEPENDENCIES=" \ | ||
build-essential \ | ||
ca-certificates \ | ||
icnsutils \ | ||
git \ | ||
git-lfs \ | ||
graphicsmagick \ | ||
wine \ | ||
wine32 \ | ||
xz-utils" | ||
|
||
ARG APT_MIRROR=http://mirrors.ustc.edu.cn | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \ | ||
&& rm -f /etc/apt/apt.conf.d/docker-clean \ | ||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ | ||
&& dpkg --add-architecture i386 \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends ${DEPENDENCIES} \ | ||
&& echo "no" | dpkg-reconfigure dash | ||
|
||
ARG NPM_REGISTRY="https://registry.npmmirror.com" | ||
RUN set -ex \ | ||
&& npm config set registry ${NPM_REGISTRY} \ | ||
&& yarn config set registry ${NPM_REGISTRY} | ||
|
||
WORKDIR /data | ||
|
||
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked \ | ||
--mount=type=bind,sources=package.json,target=/data/package.json \ | ||
yarn install | ||
|
||
ADD . /data | ||
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked \ | ||
yarn build | ||
|
||
WORKDIR /data/build |
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