forked from sheepiest/Simple-Season-Selector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
53 lines (44 loc) · 1.46 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
stages:
- package
- release
variables:
VERSION: ""
SPT_VERSION: ""
package_release:
stage: package
script:
- VERSION=$(jq -r '.version' package.json)
- SPT_VERSION=$(jq -r '.sptVersion' package.json)
- echo "Detected version: $VERSION targeting SPT $SPT_VERSION"
- mkdir -p release/user/mods/bushtail-RandomSeasonRipoff
- cp -r src release/user/mods/bushtail-RandomSeasonRipoff/
- cp -r config release/user/mods/bushtail-RandomSeasonRipoff/
- cp package.json release/user/mods/bushtail-RandomSeasonRipoff/
- cp LICENSE release/user/mods/bushtail-RandomSeasonRipoff/
- cd release
- zip -r ../bushtail-RandomSeasonRipoff.zip
artifacts:
paths:
- bushtail-RandomSeasonRipoff.zip
expire in:
1 week
create_release:
stage: release
needs:
- package_release
script:
- VERSION=$(jq -r '.version' package.json)
- SPT_VERSION=$(jq -r '.sptVersion' package.json)
- echo "Creating GitLab release for version $VERSION with SPT compatibility $SPT_VERSION..."
- echo "Creating release for Random Season Ripoff..."
release:
name: "Release v$VERSION"
tag_name: "v$VERSION"
description: |
**Version**: $VERSION
**Author**: bushtail
**SPT Version Compatibility**: $SPT_VERSION
assets:
links:
- name: "Release Package v$VERSION"
url: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/download/bushtail-RandomSeasonRipoff.zip"