-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e21553
commit 0cd3784
Showing
3 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [ 2.0 ] | ||
# tags: | ||
# - '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php: [7.4, 8.0, 8.1, 8.2, 8.3] | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
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/ | ||
php -d phar.readonly=0 vendor/bin/phar-composer build temp vendor.phar | ||
- name: Package Files | ||
run: | | ||
mkdir MarkdownParse | ||
mv vendor.phar MarkdownParse/ | ||
cp LICENSE.md MarkdownParse/ | ||
cp MarkdownParse.php 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 "::set-output name=version::$(curl -s https://api.github.com/repos/mrgeneralgoo/typecho-markdown/releases/latest | jq -r .tag_name)" | ||
|
||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref }} | ||
artifacts: "MarkdownParse.zip" | ||
body: | | ||
**Full Changelog**: https://github.com/mrgeneralgoo/typecho-markdown/compare/${{ steps.get_latest_release.outputs.version }}...${{ github.ref }}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
tests/usr | ||
vendor | ||
vendor | ||
vendor.phar |
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