Skip to content

Merge pull request #55 from mrgeneralgoo/2.0 #11

Merge pull request #55 from mrgeneralgoo/2.0

Merge pull request #55 from mrgeneralgoo/2.0 #11

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up PHP
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: mbstring
- 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}})