Merge pull request #5 from steadfast-collective/v3 #2
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 | |
# This workflow tags a release, builds front-end assets and sends various notifications & webhooks when a release has been created. | |
# How to use: | |
# 1. Create a git tag - `git tag <version number>` | |
# 2. Push tags to the origin - `git push origin --tags` | |
# 3. This Github Action will do its stuff... | |
# 4. Then it will pull the latest notes from CHANGELOG.md and add them to the 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.1 | |
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: 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: 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 }} |