changelog #30
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
release: | |
name: Prepare & Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | |
tools: composer:v2 | |
- name: Install NPM Dependencies | |
run: npm install | |
- name: Install Composer Dependencies | |
run: composer install | |
- 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@v1 | |
with: | |
version: ${{ github.ref }} | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
body: ${{ steps.changelog.outputs.text }} | |
prerelease: ${{ contains(github.ref, '-beta') }} | |
- name: Upload zip to release | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./dist.tar.gz | |
asset_name: dist.tar.gz | |
asset_content_type: application/tar+gz | |
- name: Comment on related issues | |
uses: duncanmcclean/post-release-comments@v1.0.6 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
version: ${{ github.ref }} | |
changelog: ${{ steps.changelog.outputs.text }} |