Skip to content

changelog

changelog #37

Workflow file for this run

name: Release
on: # zizmor: ignore[concurrency-limits]
push:
tags:
- "v*"
permissions: {}
jobs:
release: # zizmor: ignore[anonymous-definition]
name: Prepare & Create Release
runs-on: ubuntu-latest
permissions:
contents: write # create GitHub release and upload assets
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: 8.4
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
tools: composer:v2
- name: Install Composer Dependencies
run: composer install
- name: Install NPM Dependencies
run: npm ci
- name: Compile assets
run: npm run build
- name: Create zip
run: tar -czvf dist.tar.gz dist
- name: Get Changelog
id: changelog
uses: statamic/changelog-action@5d112d0d790cdeeb5adca3e584e37edc474ab51b # v1
with:
version: ${{ github.ref }}
- name: Create release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_VERSION: ${{ steps.changelog.outputs.version }}
RELEASE_NOTES: ${{ steps.changelog.outputs.text }}
run: |
PRERELEASE=""
if [[ "$RELEASE_VERSION" == *-beta* ]]; then PRERELEASE="--prerelease"; fi
gh release create "$RELEASE_VERSION" \
--title "$RELEASE_VERSION" \
--notes "$RELEASE_NOTES" \
$PRERELEASE \
./dist.tar.gz