Skip to content

Commit fa160b5

Browse files
authored
Merge pull request #41 from hydephp/release/v0.4.2
HydeCLI v0.4.2
2 parents 073115e + 2769384 commit fa160b5

File tree

4 files changed

+40
-76
lines changed

4 files changed

+40
-76
lines changed

.github/workflows/create-release.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,46 @@ jobs:
3636
git fetch origin master:master
3737
git reset --hard master
3838
39+
- name: Cache Composer packages
40+
id: composer-cache
41+
uses: actions/cache@v3
42+
with:
43+
path: vendor
44+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
45+
restore-keys: |
46+
${{ runner.os }}-php-
47+
48+
- name: Install dependencies
49+
run: composer install --no-interaction --no-progress --no-suggest --prefer-dist
50+
3951
- name: Bump application version
40-
id: bump-version
52+
id: build-version
4153
run: |
4254
php ./bin/bump-application-version.php ${{ github.event.inputs.type }}
4355
echo "version=$(php ./bin/get-release-version.php)" >> $GITHUB_OUTPUT
4456
echo "Version: v$(php ./bin/get-release-version.php)"
4557
58+
- name: Build executable
59+
run: php hyde standalone:build --build-version-suffix="${{ steps.build-version.outputs.sha_short }}"
60+
61+
- name: Verify executable
62+
run: php builds/hyde
63+
64+
- name: Verify executable version
65+
run: php builds/hyde --version
66+
67+
- name: Upload executable artifact
68+
uses: actions/upload-artifact@v3
69+
with:
70+
name: hyde
71+
path: builds/hyde
72+
4673
- name: Create pull request
4774
uses: peter-evans/create-pull-request@v5
4875
with:
49-
commit-message: "HydeCLI v${{ steps.bump-version.outputs.version }}"
50-
title: "HydeCLI v${{ steps.bump-version.outputs.version }}"
51-
branch: "release/v${{ steps.bump-version.outputs.version }}"
76+
commit-message: "HydeCLI v${{ steps.build-version.outputs.version }}"
77+
title: "HydeCLI v${{ steps.build-version.outputs.version }}"
78+
branch: "release/v${{ steps.build-version.outputs.version }}"
5279
delete-branch: true
5380

5481
body: |

.github/workflows/publish-release.yml

Lines changed: 8 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branches: [ "stable" ]
1010

1111
permissions:
12-
contents: write
12+
contents: read
1313

1414
jobs:
1515

@@ -29,80 +29,19 @@ jobs:
2929
git merge stable
3030
git push origin master
3131
32-
build:
33-
runs-on: ubuntu-latest
34-
name: Build standalone executable
35-
36-
steps:
37-
- uses: actions/checkout@v3
38-
39-
- name: Cache Composer packages
40-
id: composer-cache
41-
uses: actions/cache@v3
42-
with:
43-
path: vendor
44-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
45-
restore-keys: |
46-
${{ runner.os }}-php-
47-
48-
- name: Install dependencies
49-
run: composer install --no-interaction --no-progress --no-suggest --prefer-dist
50-
51-
- name: Get build version
52-
id: build-version
53-
run: |
54-
echo "version=$(php ./bin/get-release-version.php)" >> $GITHUB_OUTPUT
55-
echo "Version: v$(php ./bin/get-release-version.php)"
56-
php ./bin/get-release-version.php > version
57-
58-
- name: Build executable
59-
run: php hyde standalone:build --build-version-suffix="${{ steps.build-version.outputs.sha_short }}"
60-
61-
- name: Verify executable
62-
run: php builds/hyde
63-
64-
- name: Verify executable version
65-
run: php builds/hyde --version
66-
67-
- name: Calculate checksum
68-
run: |
69-
cd builds
70-
sha256sum hyde > checksum.txt
71-
echo "SHA256 checksum of the application binary: $(cat checksum.txt)"
72-
73-
- name: Commit executable
74-
uses: EndBug/add-and-commit@v9
75-
with:
76-
add: builds/hyde
77-
message: "Build standalone executable"
78-
79-
- name: Upload executable
80-
uses: actions/upload-artifact@v3
81-
with:
82-
name: hyde
83-
path: builds/hyde
84-
85-
- name: Upload the checksum artifact
86-
uses: actions/upload-artifact@v3
87-
with:
88-
name: checksum
89-
path: builds/checksum.txt
90-
91-
- name: Upload the version number artifact
92-
uses: actions/upload-artifact@v3
93-
with:
94-
name: version
95-
path: version
96-
9732
release:
98-
needs: build
9933
runs-on: ubuntu-latest
10034
name: Publish release
10135

10236
permissions:
10337
contents: write
10438

10539
steps:
40+
- uses: actions/checkout@v3
41+
with:
42+
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
43+
ref: stable
44+
10645
- name: Download the application artifact
10746
uses: actions/download-artifact@v3
10847
with:
@@ -122,13 +61,11 @@ jobs:
12261

12362
- name: Prepare version information
12463
run: |
125-
echo "CHECKSUM=$(cat builds/checksum.txt | cut -d ' ' -f 1)" >> $GITHUB_ENV
126-
echo "VERSION=$(cat version)" >> $GITHUB_ENV
64+
echo "VERSION=$(php ./bin/get-release-version.php)" >> $GITHUB_ENV
12765
12866
- name: Print version information
12967
run: |
13068
echo "Version: v${{ env.VERSION }}"
131-
echo "Checksum: ${{ env.CHECKSUM }}"
13269
13370
- name: Create a release
13471
uses: ncipollo/release-action@v1
@@ -138,4 +75,4 @@ jobs:
13875
commit: ${{ github.sha }}
13976
updateOnlyUnreleased: true
14077
generateReleaseNotes: true
141-
artifacts: builds/hyde, builds/checksum.txt
78+
artifacts: builds/hyde

app/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class Application extends \Hyde\Foundation\Application
88
{
9-
final public const APP_VERSION = '0.4.1';
9+
final public const APP_VERSION = '0.4.2';
1010

1111
public function getCachedPackagesPath(): string
1212
{

builds/hyde

7.69 MB
Binary file not shown.

0 commit comments

Comments
 (0)