Added release pipeline

This commit is contained in:
Marek Lesko
2025-07-14 18:49:06 +00:00
parent 3c93b53819
commit e2ba6c52e3
2 changed files with 34 additions and 2 deletions

View File

@@ -1,7 +1,8 @@
stages: # Define the stages of the pipeline. stages: # Define the stages of the pipeline.
- build - build
#- test #- test
- deploy - release
install-job: # This job runs in the build stage, which runs first. install-job: # This job runs in the build stage, which runs first.
stage: build stage: build
@@ -14,8 +15,19 @@ install-job: # This job runs in the build stage, which runs first.
paths: paths:
- Web/dist/Web/browser # The 'dist' directory will be available in the next stage. - Web/dist/Web/browser # The 'dist' directory will be available in the next stage.
semantic-release:
image: node:24
stage: release
script:
- apt update && apt install zip -y
- zip -r dist.zip Web/dist/Web/browser
- npm install --save-dev @semantic-release/gitlab
- npx semantic-release --debug
only:
- main
deploy-job: # This job runs in the deploy stage. deploy-job: # This job runs in the deploy stage.
stage: deploy # It only runs when *both* jobs in the test stage complete successfully. stage: release # It only runs when *both* jobs in the test stage complete successfully.
environment: production environment: production
tags: tags:
- deployment - deployment

20
.releaserc.json Normal file
View File

@@ -0,0 +1,20 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/gitlab",
{
"gitlabUrl": "https://gitlab.lesko.me",
"verifyConditions": [
"@semantic-release/gitlab"
],
"assets": [
{ "path": "dist.zip", "label": "bundle" },
{ "url": "https://gitlab.lesko.me/marek/centrum/-/blob/main/README.md", "label": "README.md" }
]
}
]
]
}