This repository was archived by the owner on Mar 14, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (59 loc) · 1.75 KB
/
Copy pathrelease.yml
File metadata and controls
67 lines (59 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: "发Release"
on:
push:
tags:
- "*"
jobs:
build-tar-ball:
name: "编译打包"
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact_name: "openmcim-linux.tar"
- os: windows-latest
artifact_name: "openmcim-windows.tar"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
## linux & macos
- run: npm run build
- run: |
cp $(which node) .
cp platforms/linux/run.sh .
tar -caf ${{ matrix.artifact_name }} dist nginx package.json node_modules node run.sh
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
## windows
- run: |
$SRC = (Get-Command node.exe).Path
copy $SRC node.exe
copy platforms/windows/run.ps1 .
tar -caf ${{ matrix.artifact_name }} dist package.json node_modules node.exe run.ps1
if: matrix.os == 'windows-latest'
- name: "Upload Artifact"
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_name }}
create-release:
runs-on: "ubuntu-latest"
name: "发布!"
needs: "build-tar-ball"
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.TOKEN }}"
prerelease: ${{ contains(github.ref, '-') }}
files: |
openmcim-linux.tar
openmcim-windows.tar