-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.6 KB
/
dev-release.yml
File metadata and controls
48 lines (40 loc) · 1.6 KB
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
name: "Dev Release"
on:
push:
branches: [ "development" ]
env:
ENABLED: false
jobs:
dev-release:
#if: startsWith(github.event.head_commit.message, 'Release ')
name: "Create Dev-Release"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP 8.0
uses: shivammathur/setup-php@2.12.0
with:
php-version: 8.0
extensions: yaml gd2 gd
- name: Composer
run: |
composer update --no-interaction --ignore-platform-reqs
composer install --no-suggest --no-interaction --ignore-platform-reqs
- name: "Get data"
id: metadata
run: |
echo ::set-output name=VERSION::$(php -r 'echo explode("+", explode("-", yaml_parse_file(getcwd() . DIRECTORY_SEPARATOR . "plugin.yml")["version"])[0])[0];')
echo ::set-output name=FULL_VERSION::$(php -r 'echo yaml_parse_file(getcwd() . DIRECTORY_SEPARATOR . "plugin.yml")["version"];')
echo ::set-output name=NAME::$(php -r 'echo yaml_parse_file(getcwd() . DIRECTORY_SEPARATOR . "plugin.yml")["name"];')
- name: "Build phar"
run: "php -dphar.readonly=0 build.php"
- name: "Create Development Release"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "dev"
prerelease: true
title: "Development Release v${{ steps.metadata.outputs.VERSION }}"
files: |
out/*.phar