Skip to content

Commit

Permalink
Merge branch 'master' into release/0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd authored Mar 24, 2023
2 parents 959b069 + 48ce9e4 commit 994d139
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Deploy

# Run deploy only on tag and master builds.
# Run deploy only on publised releases.
on:
push:
branches:
- master
release:
types: [published]

Expand Down Expand Up @@ -32,15 +29,24 @@ jobs:
- name: Install NPM dependencies
run: npm install

- name: Authenticate with WordPress.org SVN
run: svn info --non-interactive --username "${{ secrets.SVN_USERNAME }}" --password "${{ secrets.SVN_PASSWORD }}" https://plugins.svn.wordpress.org/two-factor/
- name: Build plugin
run: npm run build
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
env:
BUILD_DIR: dist
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}

- name: Deploy to WordPress.org SVN
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
DEPLOY_SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
DEPLOY_TRUNK: ${{ contains( github.ref_name, 'master' ) }}
DEPLOY_TAG: ${{ contains( github.ref_type, 'tag' ) }}
DEPLOY_SKIP_CONFIRMATION: true
# Disable deployments while they are failing for unknown reason.
if: env.DEPLOY_SVN_USERNAME && false
run: npm run deploy
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

0 comments on commit 994d139

Please sign in to comment.