-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
42 deletions.
There are no files selected for viewing
51 changes: 9 additions & 42 deletions
51
...hub/workflows/deploy-on-publishing-a-new-release-and-attach-a-zip-file-to-the-release.yml
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,57 +1,24 @@ | ||
name: Deploy to WordPress.org Repository | ||
|
||
name: Deploy to WordPress.org | ||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [released] | ||
|
||
# A list of jobs involved in this workflow. | ||
jobs: | ||
deploy_to_wp_repository: | ||
name: Deploy to WP.org | ||
tag: | ||
name: GATTAI | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: WordPress Plugin Deploy | ||
|
||
id: gattai-deploy | ||
|
||
- uses: actions/checkout@master | ||
- name: Build | ||
run: | | ||
npm install | ||
npm run build | ||
- name: HASSHIN | ||
uses: 10up/action-wordpress-plugin-deploy@stable | ||
|
||
with: | ||
generate-zip: true | ||
dry-run: true | ||
|
||
# Steps can also set environment variables which can be configured in the Github settings for the | ||
# repository. Here, we are using action secrets SVN_USERNAME, SVN_PASSWORD, and PLUGIN_SLUG which | ||
# authenticate with WordPress and lets the action deploy our plugin to the repository. | ||
# | ||
# To learn more about setting and using secrets with Github Actions, check out: https://docs.github.com/en/actions/security-guides/encrypted-secrets?tool=webui#about-encrypted-secrets | ||
env: | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
SLUG: ${{ secrets.SLUG }} | ||
# After the deploy, we also want to create a zip and upload it to the release on Github. We don't want | ||
# users to have to go to the repository to find our plugin :). | ||
- name: Upload release asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
# Note, this is an exception to action secrets: GH_TOKEN is always available and provides access to | ||
# the current repository this action runs in. | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
with: | ||
# Get the URL for uploading assets to the current release. | ||
upload_url: ${{ github.event.release.upload_url }} | ||
|
||
# Provide the path to the file generated in the previous step using the output. | ||
asset_path: ${{ steps.deploy.outputs.zip-path }} | ||
|
||
# Provide what the file should be named when attached to the release (plugin-name.zip) | ||
asset_name: ${{ github.event.repository.name }}.zip | ||
|
||
# Provide the file type. | ||
asset_content_type: application/zip |