Skip to content

Commit

Permalink
Add deploy ci (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records authored Jul 24, 2023
1 parent 1f5f7aa commit f6392a0
Show file tree
Hide file tree
Showing 322 changed files with 63 additions and 65,439 deletions.
6 changes: 6 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.git
/.github
/.distignore
/cos-sdk-v5/vendor/qcloud/cos-sdk-v5/sample
/cos-sdk-v5/vendor/qcloud/cos-sdk-v5/.github
/cos-sdk-v5/composer.lock
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy to WordPress.org
on:
pull_request:
release:
types: [ published ]
jobs:
tag:
name: New release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.0'
tools: composer
- name: Build
run: |
composer install -o --no-dev
working-directory: cos-sdk-v5
- name: Set Version
if: github.event_name == 'pull_request'
run: |
echo "VERSION=ci" >> $GITHUB_ENV
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
dry-run: ${{ github.event_name == 'pull_request' }}
generate-zip: ${{ github.event_name == 'release' }}
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: sync-qcloud-cos
- name: Upload release asset
uses: actions/upload-release-asset@v1
if: github.event_name == 'release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.deploy.outputs.zip-path }}
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
[![contributors](https://img.shields.io/github/contributors/sy-records/wordpress-qcloud-cos?color=blue)](https://github.com/sy-records/wordpress-qcloud-cos/graphs/contributors)
[![plugin stars](https://img.shields.io/wordpress/plugin/stars/sync-qcloud-cos)](https://wordpress.org/plugins/sync-qcloud-cos/)
[![plugin installs](https://img.shields.io/wordpress/plugin/installs/sync-qcloud-cos)](https://wordpress.org/plugins/sync-qcloud-cos/)
[![Deploy to WordPress.org](https://github.com/sy-records/wordpress-qcloud-cos/actions/workflows/deploy.yml/badge.svg)](https://github.com/sy-records/wordpress-qcloud-cos/actions/workflows/deploy.yml)

## 插件特色

Expand All @@ -34,9 +35,9 @@ WordPress 后台安装插件页面搜索`Sync QCloud COS`,点击安装

### 下载源码

Github 下载源码,通过 WordPress 后台上传安装,或者直接将源码上传到 WordPress 插件目录`wp-content/plugins`,然后在后台启用
GitHub 下载源码,通过 WordPress 后台上传安装,或者直接将源码上传到 WordPress 插件目录`wp-content/plugins`,然后在后台启用

Github 下载节点:[https://github.com/sy-records/wordpress-qcloud-cos/releases/latest](https://github.com/sy-records/wordpress-qcloud-cos/releases/latest)
GitHub 下载节点:[https://github.com/sy-records/wordpress-qcloud-cos/releases/latest](https://github.com/sy-records/wordpress-qcloud-cos/releases/latest)

## 修改配置

Expand Down
Loading

0 comments on commit f6392a0

Please sign in to comment.