-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.58 KB
/
release.yml
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
name: Create Release
on:
push:
tags:
- '*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0' # Adjust based on our requirement
- name: Install dependencies
run: composer install --no-dev
- name: Prepare release
run: |
mkdir release
shopt -s extglob
cp -R !(release) release/
cd release
composer install --no-dev
zip -r ../plover-toc.zip . -x '*.git*' -x 'tests/*' -x 'composer.json' -x 'composer.lock' -x '.gitignore' -x '.php-cs-fixer.php' -x '.php_cs' -x 'includes/.keep'
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Release of version ${{ github.ref_name }}.
For a list of changes, see [CHANGELOG](https://github.com/${{ github.repository }}/blob/master/CHANGELOG.md).
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./plover-toc.zip
asset_name: plover-toc.zip
asset_content_type: application/zip