-
Notifications
You must be signed in to change notification settings - Fork 18
58 lines (50 loc) · 1.65 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
56
57
58
name: Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup PHP
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring
coverage: none
- name: Install Composer Dependencies
run: |
composer check-platform-reqs
composer install --no-dev --prefer-dist -o
- name: Create vendor.phar
run: |
mkdir temp
cp -r vendor temp/
cp composer.json temp/
cp MarkdownParse.php temp/
php -d phar.readonly=0 vendor/bin/phar-composer build temp vendor.phar
- name: Package Files
run: |
rm -rf vendor/
mkdir MarkdownParse
mv vendor.phar MarkdownParse/
cp LICENSE.md MarkdownParse/
cp Plugin.php MarkdownParse/
cp README.md MarkdownParse/
zip -r MarkdownParse.zip MarkdownParse
- name: Get Latest Release Version
id: get_latest_release
run: |
echo "VERSION=$(curl -s https://api.github.com/repos/mrgeneralgoo/typecho-markdown/releases/latest | jq -r .tag_name)" >> $GITHUB_OUTPUT
- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.AUTO_RELEASE_TOKEN }}
tag: ${{github.ref_name}}
artifacts: "MarkdownParse.zip"
body: |
**Full Changelog**: https://github.com/mrgeneralgoo/typecho-markdown/compare/${{ steps.get_latest_release.outputs.VERSION }}...${{github.ref_name}})