-
Notifications
You must be signed in to change notification settings - Fork 12
99 lines (85 loc) · 3.01 KB
/
release.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: OGSpy Release
on:
push:
branches: [ "develop" , "master"]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name : Checkout OGSPY
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} # checkout the correct branch name
fetch-depth: 0
- name: Git Version
id: version
# You may pin to the exact commit or the version.
# uses: codacy/git-version@fa06788276d7492a2af01662649696d249ecf4cb
uses: codacy/[email protected]
with:
# The name of the release branch
release-branch: master
# The name of the dev branch
dev-branch: develop
# The prefix to use in the version
#prefix: # optional
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Replace Value
uses: jacobtomlinson/gha-find-replace@v3
with:
include : 'install/version.php'
find : '0.0.0-dev'
replace: ${{ steps.version.outputs.version }}
regex: false
- name: Checkout Xtense
uses: actions/checkout@v3
with:
repository: 'ogsteam/mod-xtense'
ref: 'master'
path: 'mod/xtense'
- name: Checkout AutoUpdate
uses: actions/checkout@v3
with:
repository: 'ogsteam/mod-autoupdate'
ref: 'master'
path: 'mod/autoupdate'
- name: Zip Release
# You may pin to the exact commit or the version.
# uses: TheDoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464
uses: TheDoctor0/[email protected]
with:
# Filename for archive
filename: ogspy-${{ steps.version.outputs.version }}.zip
# Base path for archive files
#path: # optional, default is .
# Working directory before zipping
#directory: # optional, default is .
# List of excluded files / directories
exclusions: '*.git* *.vscode* *.docker* sonar-project.properties .editorconfig composer.*'
# List of excluded files / directories with recursive wildcards (only applies on Windows with `zip` type)
#recursive_exclusions: # optional, default is
# Provide any custom parameters to the command
#custom: # optional, default is
# Tool to use for archiving
#type: # optional, default is zip
- uses: ncipollo/release-action@v1
with:
name : OGSpy ${{ steps.version.outputs.version }}
draft: true
artifacts: "ogspy-${{ steps.version.outputs.version }}.zip"
artifactContentType: zip
body : "To be Completed"
tag : ${{ steps.version.outputs.version }}