💚 minor fix
This commit is contained in:
@ -1,29 +1,39 @@
|
|||||||
workflow:
|
stages:
|
||||||
|
- build
|
||||||
|
- release
|
||||||
|
|
||||||
|
variables:
|
||||||
|
BUN_VERSION: "1.2.17"
|
||||||
|
|
||||||
|
build_app:
|
||||||
|
stage: build
|
||||||
|
image: oven/bun:${BUN_VERSION}
|
||||||
|
script:
|
||||||
|
- bun i
|
||||||
|
- bun run route:sync
|
||||||
|
- bun build --compile --minify-whitespace --minify-syntax --target bun --outfile "server-compiled" ./src/index.ts
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- server-compiled
|
||||||
|
expire_in: 1 hour
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_TAG
|
- if: $CI_COMMIT_TAG
|
||||||
|
|
||||||
stages:
|
create_release:
|
||||||
- build_and_release
|
stage: release
|
||||||
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
build-and-release:
|
needs:
|
||||||
stage: build_and_release
|
- job: build_app
|
||||||
image: oven/bun:latest
|
artifacts: true
|
||||||
script:
|
script:
|
||||||
- echo "🚀 Memulai proses build untuk tag $CI_COMMIT_TAG..."
|
- echo "Creating release and uploading server-compiled... (link:\ ${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/server-compiled)"
|
||||||
- bun install --frozen-lockfile
|
|
||||||
- bun run route:sync
|
|
||||||
- bun build --compile --minify-whitespace --minify-syntax --target bun --outfile "server-compiled" ./src/index.ts
|
|
||||||
- echo "✅ Build selesai. File 'server-compiled' telah dibuat."
|
|
||||||
release:
|
release:
|
||||||
tag_name: "$CI_COMMIT_TAG"
|
|
||||||
name: "Release $CI_COMMIT_TAG"
|
name: "Release $CI_COMMIT_TAG"
|
||||||
description: "Rilis otomatis berisi aplikasi server yang sudah dicompile."
|
tag_name: "$CI_COMMIT_TAG"
|
||||||
|
description: "Automated release for commit $CI_COMMIT_SHA"
|
||||||
assets:
|
assets:
|
||||||
links:
|
links:
|
||||||
- name: "server-compiled"
|
- name: "server-compiled"
|
||||||
url: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/server-compiled"
|
url: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/server-compiled"
|
||||||
link_type: "other"
|
rules:
|
||||||
artifacts:
|
- if: $CI_COMMIT_TAG
|
||||||
paths:
|
|
||||||
- server-compiled
|
|
||||||
expire_in: never
|
|
||||||
|
|||||||
Reference in New Issue
Block a user