-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
63 lines (60 loc) · 1.81 KB
/
.gitlab-ci.yml
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
---
stages: [checks, build, release]
check-commitizen:
# Check the current commit message for compliance with commitizen
stage: checks
image: nixpkgs/nix-flakes:latest
variables:
GIT_STRATEGY: none
script: nix run nixpkgs#commitizen -- check --message "$CI_COMMIT_TITLE"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
build-linux:
image: node:22-slim
stage: build
script:
- apt-get update
- |
DEBIAN_FRONTEND=noninteractive apt-get install -y \
libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libsoup-3.0-0
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y
- source "$HOME/.cargo/env"
- corepack enable pnpm
- pnpm install
- pnpm run tauri build
artifacts:
when: on_success
access: all
expire_in: '30 days'
paths:
- src-tauri/target/release/bundle/deb/*.deb
- src-tauri/target/release/bundle/appimage/*.AppImage
- src-tauri/target/release/bundle/rpm/*.rpm
tag-to-release:
stage: release
# https://gitlab.com/gitlab-org/release-cli/-/blob/master/Dockerfile
image: registry.gitlab.com/gitlab-org/release-cli:latest
dependencies:
- build-linux
variables:
GIT_STRATEGY: none
script:
- apk add --no-cache --upgrade git py3-pip
- pip install -U commitizen
- git clone "$CI_PROJECT_URL.git"
- cd "$CI_PROJECT_NAME"
- CHANGELOG=$(cz changelog "$CI_COMMIT_TAG" --dry-run | sed /^Invalid/d)
- release-cli create --name "$CI_COMMIT_TAG" --description "$CHANGELOG" \
--tag-name "$CI_COMMIT_TAG"
rules:
- if: $CI_COMMIT_TAG != null