manual release #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 'taylorotwell@users.noreply.github.com' | |
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 }} |