Skip to content

Commit c89563a

Browse files
authored
Merge pull request #2 from Automattic/add/release
Add a release workflow
2 parents 2f4801d + ac358f4 commit c89563a

File tree

3 files changed

+51
-5
lines changed

3 files changed

+51
-5
lines changed

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and Distribute Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Setup PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: '8.1'
17+
18+
- name: Install dependencies
19+
run: composer install --no-dev --optimize-autoloader
20+
21+
- name: Create distribution
22+
run: |
23+
mkdir dist
24+
rsync -av \
25+
--exclude-from='.distignore' \
26+
--exclude='.git' \
27+
--exclude='.github' \
28+
--exclude='dist' \
29+
. dist/
30+
31+
- name: Create ZIP archive
32+
run: zip -r distribution.zip dist
33+
34+
- name: Upload distribution as artifact
35+
uses: actions/upload-artifact@v2
36+
with:
37+
name: distribution
38+
path: distribution.zip
39+
40+
- name: Upload to release
41+
uses: actions/upload-release-asset@v1
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
with:
45+
upload_url: ${{ github.event.release.upload_url }}
46+
asset_path: ./distribution.zip
47+
asset_name: distribution.zip
48+
asset_content_type: application/zip

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ $ wp sqlite export [<file>] [--tables=<tables>] [--exclude-tables] [--porcelain]
3838
Exclude certain tables from the export. Use commas to separate multiple table names.
3939

4040
[--porcelain]
41-
Output just the SQL commands, without any comments.
41+
Output filename for the exported database.
4242

composer.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "automattic/wp-cli-sqlite-command",
33
"description": "A command for importing and exporting from an SQLite database",
4+
"homepage": "https://github.com/Automattic/wp-cli-sqlite-command",
45
"type": "wp-cli-package",
56
"license": "MIT",
67
"autoload": {
@@ -36,11 +37,8 @@
3637
]
3738
},
3839
"config": {
39-
"process-timeout": 7200,
40-
"sort-packages": true,
4140
"allow-plugins": {
42-
"dealerdirect/phpcodesniffer-composer-installer": true,
43-
"johnpbloch/wordpress-core-installer": true
41+
"dealerdirect/phpcodesniffer-composer-installer": true
4442
}
4543
}
4644
}

0 commit comments

Comments
 (0)