Skip to content

Commit d9622f1

Browse files
Merge pull request #23 from PaystackOSS/patch/v1.3.2
Create workflow
2 parents 23be341 + a935424 commit d9622f1

File tree

2 files changed

+54
-17
lines changed

2 files changed

+54
-17
lines changed

.github/workflow

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy to WordPress.org
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
tag:
7+
name: New release
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
- name: WordPress Plugin Deploy
13+
id: deploy
14+
uses: 10up/action-wordpress-plugin-deploy@stable
15+
with:
16+
generate-zip: true
17+
env:
18+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
19+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
20+
SLUG: paystack-memberpress
21+
- name: Upload release asset
22+
uses: actions/upload-release-asset@v1
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
25+
with:
26+
upload_url: ${{ github.event.release.upload_url }}
27+
asset_path: ${{ steps.deploy.outputs.zip-path }}
28+
asset_name: ${{ github.event.repository.name }}.zip
29+
asset_content_type: application/zip

.github/workflows/deploy.yml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
1-
name: Deploy WordPress plugin
1+
name: Deploy to WordPress.org
22
on:
3-
push:
4-
branches: [ master, 'release/v[0-9].[0-9].[0-9]' ]
5-
3+
release:
4+
types: [published]
65
jobs:
7-
build:
8-
name: Deploy WordPress plugin
9-
# 2. Specify Linux runner
10-
runs-on: ubuntu-20.04
6+
tag:
7+
name: New release
8+
runs-on: ubuntu-latest
119
steps:
12-
# 3. Checkout before Use this deployment action
13-
- name: Checkout
14-
uses: actions/checkout@v3
15-
# 4. Use action with environment variable set by secrets
16-
- name: Deploy
17-
uses: yukihiko-shinoda/[email protected]
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
- name: WordPress Plugin Deploy
13+
id: deploy
14+
uses: 10up/action-wordpress-plugin-deploy@stable
15+
with:
16+
generate-zip: true
1817
env:
19-
SVN_REPOSITORY_URL: ${{ secrets.SVN_REPO_URL }}
20-
SVN_USER_NAME: ${{ secrets.SVN_USERNAME }}
21-
SVN_USER_PASSWORD: ${{ secrets.SVN_PASSWORD }}
18+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
19+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
20+
SLUG: paystack-memberpress
21+
- name: Upload release asset
22+
uses: actions/upload-release-asset@v1
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
25+
with:
26+
upload_url: ${{ github.event.release.upload_url }}
27+
asset_path: ${{ steps.deploy.outputs.zip-path }}
28+
asset_name: ${{ github.event.repository.name }}.zip
29+
asset_content_type: application/zip

0 commit comments

Comments
 (0)