-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
59 lines (54 loc) · 1.73 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
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
variables:
BUNDLE_NAME: "blackbox.flatpak"
flatpak:
extends: .flatpak
timeout: 90m
variables:
GIT_SUBMODULE_STRATEGY: normal
# Replace with your manifest path
MANIFEST_PATH: "com.fyralabs.Accelerator.json"
RUNTIME_REPO: "https://flathub.org/repo/flathub.flatpakrepo"
# Replace with your application name, as written in the manifest
FLATPAK_MODULE: "blackbox"
APP_ID: "com.fyralabs.Accelerator"
BUNDLE: ${BUNDLE_NAME}
before_script:
- flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
persist_artifacts:
needs:
- job: flatpak
artifacts: true
script:
- PA_JOB_ID=${CI_JOB_ID}
- echo "PA_JOB_ID=$PA_JOB_ID" >> persist_artifacts.env
artifacts:
name: ${BUNDLE_NAME}
paths:
- ${BUNDLE_NAME}
reports:
# To ensure we've access to this file in the next stage
dotenv: persist_artifacts.env
expire_in: never
# Only run this for tag pipelines (releases)
rules:
- if: $CI_COMMIT_TAG
# https://crypt.codemancers.com/posts/2021-08-31-release-artifacts-using-gitlab-cicd/
release:
image: registry.gitlab.com/gitlab-org/release-cli:latest
script:
- echo "Releasing ${CI_COMMIT_TAG}"
needs:
- job: persist_artifacts
artifacts: true
release:
name: 'Release $CI_COMMIT_TAG'
description: 'Created using the release-cli'
tag_name: '$CI_COMMIT_TAG'
assets:
links:
- name: 'Flatpak bundle'
url: 'https://gitlab.gnome.org/raggesilver/blackbox/-/jobs/${PA_JOB_ID}/artifacts/file/${BUNDLE_NAME}'
# Only run this for tag pipelines (releases)
rules:
- if: $CI_COMMIT_TAG