File: .gitlab-ci.yml

package info (click to toggle)
blackbox-terminal 0.14.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,288 kB
  • sloc: xml: 197; ansic: 53; makefile: 23; python: 12; sh: 11
file content (60 lines) | stat: -rw-r--r-- 1,843 bytes parent folder | download
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
include: "https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml"

variables:
  BUNDLE_NAME: "blackbox.flatpak"

flatpak:
  extends: .flatpak
  image: "quay.io/gnome_infrastructure/gnome-runtime-images:gnome-44"
  timeout: 90m
  variables:
    GIT_SUBMODULE_STRATEGY: normal

    # Replace with your manifest path
    MANIFEST_PATH: "com.raggesilver.BlackBox.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.raggesilver.BlackBox"
    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