Skip to content

manual release

manual release #1

Workflow file for this run

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 "::set-output name=version::${VERSION#v}"
- name: Update Application.php version
run: |
sed -i "s/const VERSION = '.*';/const VERSION = '${{ steps.version.outputs.version }}';/g" src/Illuminate/Foundation/Application.php
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 }}
- name: Change directory
run: cd laravel-${{ github.ref_name }}
- name: Pull in latest changes
run: git pull origin ${{ github.ref_name }}
- name: Run release script
run: bash bin/release v${{ steps.version.outputs.version }}
- 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 }}