forked from ChatGPTBox-dev/chatGPTBox
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (69 loc) · 2.29 KB
/
pre-release-build.yml
File metadata and controls
78 lines (69 loc) · 2.29 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: pre-release
on:
workflow_dispatch:
# push:
# branches:
# - master
# paths:
# - "src/**"
# - "!src/**/*.json"
# - "build.mjs"
# tags-ignore:
# - "v*"
permissions:
id-token: "write"
contents: "write"
jobs:
build_and_release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Detect Node version
run: echo "NODE_VERSION=$(node -p 'process.versions.node')" >> $GITHUB_ENV
- run: npm ci
- name: Cache Webpack filesystem cache
uses: actions/cache@v4
with:
path: |
.cache/webpack
node_modules/.cache/webpack
key: ${{ runner.os }}-node${{ env.NODE_VERSION }}-webpack-${{ hashFiles('**/package-lock.json', 'build.mjs') }}
restore-keys: |
${{ runner.os }}-node${{ env.NODE_VERSION }}-webpack-
- run: npm run build
- uses: josStorer/get-current-time@v2
id: current-time
with:
format: YYYY_MMDD_HHmm
- uses: actions/upload-artifact@v6
with:
name: Chromium_Build_${{ steps.current-time.outputs.formattedTime }}
path: build/chromium/*
- uses: actions/upload-artifact@v6
with:
name: Firefox_Build_${{ steps.current-time.outputs.formattedTime }}
path: build/firefox/*
- uses: actions/upload-artifact@v6
with:
name: Chromium_Build_WithoutKatex_${{ steps.current-time.outputs.formattedTime }}
path: build/chromium-without-katex-and-tiktoken/*
- uses: actions/upload-artifact@v6
with:
name: Firefox_Build_WithoutKatex_${{ steps.current-time.outputs.formattedTime }}
path: build/firefox-without-katex-and-tiktoken/*
- uses: marvinpinto/action-automatic-releases@v1.2.1
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
build/chromium.zip
build/firefox.zip
build/chromium-without-katex-and-tiktoken.zip
build/firefox-without-katex-and-tiktoken.zip