Skip to content

Commit 2ac4a3d

Browse files
authored
Merge pull request #31 from ProgressPlanner/develop
Replace deploy workflow
2 parents 8ed6af3 + 91ac708 commit 2ac4a3d

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

.github/workflows/deploy.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
1-
name: "Deploy to WordPress.org"
1+
name: Deploy to WordPress.org repository
22

33
on:
4-
push:
5-
tags:
6-
- "v*"
4+
release:
5+
types: [released]
76

87
jobs:
9-
tag:
10-
name: New tag
8+
deploy_to_wordpress_org:
9+
name: Deploy release
1110
runs-on: ubuntu-latest
12-
if: ${{ github.ref == 'refs/heads/main' }}
1311
steps:
14-
- uses: actions/checkout@main
15-
- name: WordPress Plugin Deploy
16-
uses: 10up/action-wordpress-plugin-deploy@develop
12+
# Checkout the code
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
# Optional: if we add a build step to the plugin, we can run it here.
16+
# Deploy the plugin to WordPress.org
17+
- name: WordPress plugin deploy
18+
id: deploy
19+
uses: 10up/action-wordpress-plugin-deploy@stable
20+
with:
21+
generate-zip: true
1722
env:
1823
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
1924
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
20-
SLUG: aaa-option-optimizer
25+
# After the deploy, we also want to create a zip and upload it to the release on Github. We don't want
26+
# users to have to go to the repository to find our plugin :).
27+
- name: Upload release asset
28+
uses: Shopify/upload-to-release@master
29+
with:
30+
name: ${{ github.event.repository.name }}.zip
31+
path: ${{ steps.deploy.outputs.zip-path }}
32+
repo-token: ${{ secrets.GITHUB_TOKEN }}
33+
content-type: application/zip

0 commit comments

Comments
 (0)