Skip to content

Release

Release #7

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version number (e.g., 1.2.3 without v prefix)'
required: true
type: string
message:
description: 'Release message/description'
required: true
type: string
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: main
- name: Generate Version.php
run: |
VERSION="${{ github.event.inputs.version }}"
RELEASE_DATE=$(date +%Y-%m-%d)
cat > src/Version.php << EOF
<?php
namespace Feolius\Hell2Shape;
/**
* Version information for hell2shape.
* This file is automatically generated during release.
* Do not edit manually.
*/
final class Version
{
public const VERSION = '$VERSION';
public const RELEASE_DATE = '$RELEASE_DATE';
}
EOF
echo "Generated Version.php:"
cat src/Version.php
- name: Commit Version.php
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: Release v${{ github.event.inputs.version }}
tag_name: v${{ github.event.inputs.version }}
tagging_message: ${{ github.event.inputs.message }}