Skip to content

Commit 76e5479

Browse files
committed
build test
1 parent 86e488a commit 76e5479

3 files changed

Lines changed: 56 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: dorny/paths-filter@v3
17+
id: changes
18+
with:
19+
filters: |
20+
src:
21+
- "scripts/*"
22+
- "src/*.ts"
23+
- "styles/*.ts"
24+
- "themes/*.ts"
25+
- "vite.config.ts"
26+
- "package.json"
27+
28+
- name: Build theme
29+
id: build
30+
if: steps.changes.outputs.src == 'true'
31+
run: |
32+
npm install
33+
npm run build
34+
env:
35+
GH_TOKEN: ${{ github.token }}
36+
37+
- name: Upload css assets
38+
if: steps.build.outcome == 'success'
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: themes
42+
path: dist/*.css
43+
44+
- name: Upload templates assets
45+
if: steps.build.outcome == 'success'
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: templates
49+
path: templates

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"format": "prettier --write .",
1010
"commit": "npm run lint && npm run format && npm run build",
1111
"version": "node scripts/version.cjs",
12-
"install:clean": "npm cache clean --force && rm -rf node_modules package-lock.json && npm install"
12+
"install:clean": "npm cache clean --force && rm -rf node_modules package-lock.json && npm install",
13+
"tr": "node scripts/translate.ts"
1314
},
1415
"devDependencies": {
1516
"@babel/preset-typescript": "^7.28.4",

scripts/translate.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import * as dotenv from "dotenv";
2+
3+
dotenv.config({ quiet: true });
4+
5+
console.log(process.env.GITEA_PATH);

0 commit comments

Comments
 (0)