-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.67 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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 }}