Skip to content

Commit 90f2bda

Browse files
committed
chore: github action added
1 parent c6ee466 commit 90f2bda

23 files changed

+190
-4
lines changed

.github/pull_request_template.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Pull Request
2+
3+
## Description
4+
Brief description of what this PR does.
5+
6+
## Motivation & Context
7+
Why is this change needed? What problem does it solve?
8+
9+
## Related Links: (if applicable)
10+
<!-- Optional: Add a Notion issue or feature link here for reference -->
11+
12+
## Type of Change
13+
- [ ] 🐛 Bug fix
14+
- [ ] ✨ New feature
15+
- [ ] 💥 Breaking change
16+
- [ ] 📚 Documentation update
17+
- [ ] ⚡ Improvement
18+
- [ ] 🔄 Code refactor
19+
20+
## Checklist
21+
- [ ] Code follows project style guidelines
22+
- [ ] Self-review completed
23+
- [ ] Tests added/updated
24+
- [ ] Documentation updated if needed
25+
- [ ] README updated if needed
26+
27+
## Changelog

.github/workflows/deploy.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: Deploy to WordPress.org Repository
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
deploy_to_wp_repository:
9+
name: Deploy to WP.org
10+
runs-on: ubuntu-latest
11+
env:
12+
PLUGIN_SLUG: file-manager
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup PHP
18+
id: setup-php
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '8.x'
22+
tools: composer:v2, wp-cli
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 22
28+
29+
- name: Install pnpm
30+
uses: pnpm/action-setup@v4
31+
with:
32+
run_install: false
33+
34+
- name: Get pnpm store directory
35+
id: pnpm-cache
36+
shell: bash
37+
run: |
38+
echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
39+
40+
- name: Get composer cache directory
41+
id: composer-cache
42+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
43+
44+
- uses: actions/cache@v4
45+
name: Setup package cache
46+
with:
47+
path: |
48+
'${{ steps.pnpm-cache.outputs.dir }}'
49+
'${{ steps.composer-cache.outputs.dir }}'
50+
key: ${{ runner.os }}-cached-package-${{ hashFiles('**/pnpm-lock.yaml', '**/composer.lock') }}
51+
restore-keys: |
52+
${{ runner.os }}-cached-package-
53+
54+
- name: Check for SVN
55+
id: check_svn
56+
run: |
57+
if ! command -v svn &> /dev/null; then
58+
echo "SVN not found, installing..."
59+
sudo apt-get update
60+
sudo apt-get install -y subversion
61+
else
62+
echo "SVN is already installed."
63+
fi
64+
65+
- name: Determine if this is a release or push
66+
id: set-test-action
67+
run: |
68+
if [[ "${{ github.event_name }}" == "release" ]]; then
69+
echo "TEST_ACTION=false" >> $GITHUB_ENV
70+
else
71+
echo "TEST_ACTION=true" >> $GITHUB_ENV
72+
fi
73+
74+
- name: Build
75+
id: build-plugin
76+
run: |
77+
pnpm production
78+
pnpm build:copy
79+
80+
if [ -d "${{ github.workspace }}/build/${{ env.PLUGIN_SLUG }}" ]; then
81+
echo "free_exists=true" >> "${GITHUB_OUTPUT}"
82+
else
83+
echo "free_exists=false" >> "${GITHUB_OUTPUT}"
84+
fi
85+
86+
- name: WordPress Plugin Deploy
87+
if: steps.build-plugin.outputs.free_exists == 'true'
88+
id: deploy
89+
uses: 10up/action-wordpress-plugin-deploy@stable
90+
with:
91+
generate-zip: true
92+
dry-run: ${{ env.TEST_ACTION }}
93+
env:
94+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
95+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
96+
BUILD_DIR: '${{ github.workspace }}/build/${{ env.PLUGIN_SLUG }}'
97+
SLUG: ${{ env.PLUGIN_SLUG }}
98+
ASSETS_DIR: '${{ github.workspace }}/svn-assets'
99+
100+
- name: Upload release asset
101+
if: steps.build-plugin.outputs.free_exists == 'true'
102+
uses: softprops/action-gh-release@v2
103+
env:
104+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105+
with:
106+
files: ${{ steps.deploy.outputs['zip-path'] }}

.github/workflows/test-all.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Run Lefthook on Push
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
- 'feature/*'
8+
- 'fix/*'
9+
10+
jobs:
11+
setup:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 1
19+
20+
- uses: pnpm/action-setup@v4
21+
name: Install pnpm
22+
with:
23+
run_install: true
24+
25+
- name: Install Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
cache: 'pnpm'
30+
31+
- name: Cache Composer dependencies
32+
uses: actions/cache@v4
33+
with:
34+
path: |
35+
/tmp/composer-cache
36+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-composer-
39+
40+
- uses: php-actions/composer@v6
41+
with:
42+
php_version: '8.4'
43+
version: '2.2'
44+
dev: no
45+
args: --prefer-dist --no-dev --optimize-autoloader
46+
47+
# - name: Install php dependencies
48+
# run: composer install --prefer-dist --no-progress
49+
50+
- name: Run Lefthook
51+
run: pnpm lefthook run github-actions

backend/app/Config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ class Config
2121

2222
const VAR_PREFIX = 'bit_fm_';
2323

24-
const VERSION = '6.8.5';
24+
const VERSION = '6.8.6';
2525

26-
const VERSION_ID = 685;
26+
const VERSION_ID = 686;
2727

2828
const DB_VERSION = '1.0';
2929

file-manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Plugin URI: https://bitapps.pro/bit-file-manager
66
* Author: File Manager by Bit Form Team
77
* Author URI: https://bitapps.pro
8-
* Version: 6.8.5
8+
* Version: 6.8.6
99
* Requires at least: 5.0
1010
* Requires PHP: 7.4
1111
* Text domain: file-manager

readme.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: file manager, wp file manager, wordpress file manager, files, ftp
55
Requires at least: 5.0
66
Tested up to: 6.8.3
77
Requires PHP: 7.4
8-
Stable tag: 6.8.5
8+
Stable tag: 6.8.6
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -299,6 +299,8 @@ Yes, It is possible to edit writeable files in the wordpress directory using cod
299299
11. Server details
300300
12. Emailing File
301301
13. Changing file permission
302+
14. Shortcode and User/Role based folder permission settings
303+
15. File Manager activity logs
302304

303305
== Upgrade Notice ==
304306

svn-assets/banner-1544x500.png

69.7 KB
Loading

svn-assets/banner-772x250.png

70.3 KB
Loading

svn-assets/screenshot-1.png

-69.1 KB
Loading

svn-assets/screenshot-10.png

-121 KB
Loading

0 commit comments

Comments
 (0)