-
Notifications
You must be signed in to change notification settings - Fork 11.1k
66 lines (57 loc) · 2.17 KB
/
releases.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
name: manual release
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Remove optional "v" prefix
id: version
run: |
VERSION=${{ inputs.version }}
echo "version=${VERSION#v}" >> "$GITHUB_OUTPUT"
- name: Update Application.php version
run: |
sed -i "s/const VERSION = '.*';/const VERSION = '${{ steps.version.outputs.version }}';/g" src/Illuminate/Foundation/Application.php
git config --global user.name 'Taylor Otwell'
git config --global user.email '[email protected]'
git add src/Illuminate/Foundation/Application.php
git commit -m "Update version to v${{ steps.version.outputs.version }}"
git push origin ${{ github.ref_name }}
- name: SSH into splitter server
uses: appleboy/ssh-action@master
with:
host: 104.248.56.26
username: forge
key: ${{ secrets.SSH_PRIVATE_KEY_SPLITTER }}
script: |
cd laravel-${{ github.ref_name }}
git pull origin ${{ github.ref_name }}
bash bin/release v${{ steps.version.outputs.version }}
script_stop: true
- name: Generate release notes
id: notes
uses: RedCrafter07/release-notes-action@main
with:
tag-name: v${{ steps.version.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref_name }}
- name: Cleanup release notes
run: |
sed -i '/## What\'\''s Changed/q' ${{ steps.notes.outputs.release-notes }}
sed -i '/## Contributors/,$d' ${{ steps.notes.outputs.release-notes }}
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.version.outputs.version }}
release_name: v${{ steps.version.outputs.version }}
body: ${{ steps.notes.outputs.release-notes }}