Skip to content

Release Package

Release Package #7

Workflow file for this run

name: Release Package
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-24.04
name: Release v${{ inputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Remove optional "v" prefix
id: version
run: |
echo "version=${VERSION#v}" >> "$GITHUB_OUTPUT"
env:
VERSION: ${{ inputs.version }}
- name: Remove unnecessary files
run: |
find . -maxdepth 1 -not -path "./src" -not -path "./.git" -not -path "./composer.json" -not -path "./LICENSE.md" -not -path "./README.md" -not -path "." -print0 | xargs -0 rm -rf
- name: Git commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update version to v${{ steps.version.outputs.version }}"
- name: Create release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.version.outputs.version }}
name: v${{ steps.version.outputs.version }}
target_commitish: ${{ github.ref_name }}
make_latest: "${{ github.ref_name == '1.x' }}"