Skip to content

Commit 9df99dc

Browse files
committed
Add GH action for manifest update
1 parent 57a9807 commit 9df99dc

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed

.github/workflows/manifest.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Manifest
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
updateManifest:
11+
name: Update manifest
12+
runs-on: ubuntu-latest
13+
env:
14+
phpVersion: '8.0'
15+
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
16+
key: winter-cms-cache-develop
17+
steps:
18+
- name: Cancel previous incomplete runs
19+
uses: styfle/[email protected]
20+
with:
21+
access_token: ${{ github.token }}
22+
23+
- name: Checkout changes
24+
uses: actions/checkout@v3
25+
26+
- name: Setup extension cache
27+
id: extcache
28+
uses: shivammathur/cache-extensions@v1
29+
with:
30+
php-version: ${{ env.phpVersion }}
31+
extensions: ${{ env.extensions }}
32+
key: ${{ env.key }}
33+
34+
- name: Cache extensions
35+
uses: actions/cache@v3
36+
with:
37+
path: ${{ steps.extcache.outputs.dir }}
38+
key: ${{ steps.extcache.outputs.key }}
39+
restore-keys: ${{ steps.extcache.outputs.key }}
40+
41+
- name: Install PHP
42+
uses: shivammathur/setup-php@v2
43+
with:
44+
php-version: ${{ env.phpVersion }}
45+
extensions: ${{ env.extensions }}
46+
47+
- name: Setup dependency cache
48+
id: composercache
49+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
50+
51+
- name: Cache dependencies
52+
uses: actions/cache@v3
53+
with:
54+
path: ${{ steps.composercache.outputs.dir }}
55+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
56+
restore-keys: ${{ runner.os }}-composer-
57+
58+
- name: Install Composer dependencies
59+
run: composer install --no-interaction --no-progress --no-scripts
60+
61+
- name: Download manifest
62+
run: wget -O builds.json https://github.com/wintercms/meta/raw/master/manifest/builds.json
63+
64+
- name: Run manifest
65+
run: php artisan winter:manifest builds.json
66+
67+
- name: Create artifact
68+
uses: actions/upload-artifact@v3
69+
with:
70+
name: winter-manifest
71+
path: builds.json

modules/system/console/WinterManifest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public function handle()
227227
protected function getVersionInt(string $version)
228228
{
229229
// Get major.minor.patch versions
230-
if (!preg_match('/^([0-9]+)\.([0-9]+)\.([0-9]+)/', $version, $versionParts)) {
230+
if (!preg_match('/^v?([0-9]+)\.([0-9]+)\.([0-9]+)/', $version, $versionParts)) {
231231
throw new ApplicationException('Invalid version string - must be of the format "major.minor.path"');
232232
}
233233

0 commit comments

Comments
 (0)