-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from Bynder/feature/GC-5231
👷 Updating to listen to releases for publishing to production
- Loading branch information
Showing
6 changed files
with
19,589 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,49 @@ | ||
name: Deploy to WordPress.org | ||
name: Deploy to WordPress.org Repository | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
release: | ||
# run only when a new release is published, but not when it's classified as a pre-release. | ||
types: [released] | ||
|
||
jobs: | ||
tag: | ||
name: New tag | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Clone the repo | ||
- uses: actions/checkout@master | ||
# Prepare the release | ||
- run: ls | ||
- run: "composer install --no-dev" | ||
# Release to WordPress.org | ||
- name: WordPress Plugin Deploy | ||
id: deploy | ||
uses: 10up/[email protected] | ||
with: | ||
generate-zip: true | ||
env: | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
SLUG: gathercontent-import | ||
deploy_to_wp_repository: | ||
name: Deploy to WP.org | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install NodeJS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "package.json" | ||
cache-dependency-path: 'package-lock.json' | ||
cache: "npm" | ||
|
||
- name: Build | ||
run: | | ||
npm ci --legacy-peer-deps | ||
npm run build | ||
- name: Composer | ||
run: | | ||
composer install --no-dev | ||
- name: WordPress Plugin Deploy | ||
id: deploy | ||
uses: 10up/[email protected] | ||
with: | ||
generate-zip: true | ||
env: | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
|
||
- name: Upload release asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.