-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
45 lines (42 loc) · 1.21 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
# GitLab CI/CD configuration file https://docs.gitlab.com/ee/ci/yaml/gitlab_ci_yaml.html
stages:
- package
- release
package-job:
stage: package
script:
- echo "Packaging WP-plugintemplate plugin ..."
- mkdir artifacts
- cp LICENSE wp-plugintemplate/LICENSE
- cp README.md wp-plugintemplate/README.md
- cp CHANGELOG.md wp-plugintemplate/CHANGELOG.md
- zip -r ./artifacts/wp-plugintemplate.zip ./wp-plugintemplate/
- echo "WP-plugintemplate plugin packaged."
artifacts:
name: '$CI_JOB_NAME $CI_COMMIT_SHORT_SHA'
untracked: false
paths:
- artifacts/
release-job:
stage: release
rules:
- if: $CI_COMMIT_TAG
script:
- echo "Release WP-plugintemplate plugin $CI_COMMIT_TAG ..."
- echo "WP-plugintemplate plugin released."
dependencies:
- package-job
artifacts:
name: 'wp-plugintemplate_$CI_COMMIT_TAG'
untracked: false
paths:
- artifacts/
release:
tag_name: '$CI_COMMIT_TAG'
description: '$CI_COMMIT_TAG'
ref: '$CI_COMMIT_SHA'
assets:
links:
- name: 'WP-plugintemplate $CI_COMMIT_TAG'
url: 'https://git.manche.io/wordpress/wpplugintemplate/-/jobs/$CI_JOB_ID/artifacts/download'
link_type: package