-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
45 lines (40 loc) · 979 Bytes
/
.gitlab-ci.yml
File metadata and controls
45 lines (40 loc) · 979 Bytes
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
stages:
- build
- test
- release
variables:
GO_VERSION: "1.23"
before_script:
- apt-get update -qq && apt-get install -qqy zip unzip
build:
stage: build
image: golang:${GO_VERSION}
script:
- go build -v -o PowerShellProfileLauncher.exe
- zip PowerShellProfileLauncher.zip PowerShellProfileLauncher.exe profiles.csv.tmpl config.yaml.tmpl
artifacts:
paths:
- PowerShellProfileLauncher.zip
test:
stage: test
image: golang:${GO_VERSION}
script:
- go test -v ./...
release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
script:
- echo "Creating release"
needs:
- build
- test
rules:
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
release:
name: "Release $CI_COMMIT_TAG"
tag_name: "$CI_COMMIT_TAG"
description: "Release notes for $CI_COMMIT_TAG"
assets:
links:
- name: "PowerShellProfileLauncher.zip"
url: "$CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/download"