mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Merge pull request #253 from TriliumNext/feature/update_ci
CI improvements
This commit is contained in:
commit
f9a4f9b538
3
.github/workflows/build.yml
vendored
Normal file
3
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
on:
|
||||
workflow_call:
|
||||
|
5
.github/workflows/dev.yml
vendored
5
.github/workflows/dev.yml
vendored
@ -4,6 +4,11 @@ on:
|
||||
branches:
|
||||
- '!develop'
|
||||
- '!feature/update*'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_docker:
|
||||
name: Build Docker image
|
||||
|
30
.github/workflows/main.yml
vendored
30
.github/workflows/main.yml
vendored
@ -4,9 +4,15 @@ on:
|
||||
branches:
|
||||
- 'develop'
|
||||
- 'feature/update*'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build_darwin-x64:
|
||||
name: Build macOS x86_64
|
||||
@ -19,7 +25,9 @@ jobs:
|
||||
node-version: 20
|
||||
cache: "npm"
|
||||
- run: npm ci
|
||||
- run: ./bin/build-mac-x64.sh
|
||||
- run: |
|
||||
./bin/update-build-info.sh
|
||||
./bin/build-mac-x64.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: trilium-mac-x64.zip
|
||||
@ -35,7 +43,9 @@ jobs:
|
||||
node-version: 20
|
||||
cache: "npm"
|
||||
- run: npm ci
|
||||
- run: ./bin/build-mac-arm64.sh
|
||||
- run: |
|
||||
./bin/update-build-info.sh
|
||||
./bin/build-mac-arm64.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: trilium-mac-arm64.zip
|
||||
@ -51,7 +61,9 @@ jobs:
|
||||
node-version: 20
|
||||
cache: "npm"
|
||||
- run: npm ci
|
||||
- run: ./bin/build-linux-x64.sh
|
||||
- run: |
|
||||
./bin/update-build-info.sh
|
||||
./bin/build-linux-x64.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: trilium-linux-x64.tar.xz
|
||||
@ -71,7 +83,9 @@ jobs:
|
||||
node-version: 20
|
||||
cache: "npm"
|
||||
- run: npm ci
|
||||
- run: ./bin/build-server.sh
|
||||
- run: |
|
||||
./bin/update-build-info.sh
|
||||
./bin/build-server.sh
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: trilium-linux-x64-server.tar.xz
|
||||
@ -94,11 +108,13 @@ jobs:
|
||||
node-version: 20
|
||||
cache: "npm"
|
||||
- run: npm ci
|
||||
- run: ./bin/build-win-x64.sh
|
||||
- run: |
|
||||
./bin/update-build-info.sh
|
||||
./bin/build-win-x64.sh DONTPACK
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: trilium-windows-x64.zip
|
||||
path: dist/trilium-windows-x64-*.zip
|
||||
name: trilium-windows-x64
|
||||
path: dist/trilium-windows-x64
|
||||
build_docker:
|
||||
name: Build Docker image
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -34,9 +34,11 @@ rm -rf $BUILD_DIR/dump-db/node_modules
|
||||
|
||||
cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.bat $BUILD_DIR/
|
||||
|
||||
echo "Zipping windows x64 electron distribution..."
|
||||
VERSION=`jq -r ".version" package.json`
|
||||
if [ "$1" != "DONTPACK" ]
|
||||
then
|
||||
echo "Zipping windows x64 electron distribution..."
|
||||
VERSION=`jq -r ".version" package.json`
|
||||
|
||||
cd dist
|
||||
|
||||
zip -r9 trilium-windows-x64-${VERSION}.zip trilium-windows-x64
|
||||
cd dist
|
||||
zip -r9 trilium-windows-x64-${VERSION}.zip trilium-windows-x64
|
||||
fi
|
@ -32,7 +32,7 @@ mv package.json.tmp package.json
|
||||
|
||||
git add package.json
|
||||
|
||||
echo 'export = { buildDate:"'`date --iso-8601=seconds`'", buildRevision: "'`git log -1 --format="%H"`'" };' > src/services/build.ts
|
||||
./update-build-info.sh
|
||||
|
||||
git add src/services/build.ts
|
||||
|
||||
|
3
bin/update-build-info.sh
Executable file
3
bin/update-build-info.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo 'export = { buildDate:"'`date --iso-8601=seconds`'", buildRevision: "'`git log -1 --format="%H"`'" };' > src/services/build.ts
|
Loading…
x
Reference in New Issue
Block a user