Skip to content

Commit

Permalink
a test for simple deploy on WP.org
Browse files Browse the repository at this point in the history
  • Loading branch information
phalkmin authored Apr 18, 2024
1 parent dc01c1d commit 7f7a010
Showing 1 changed file with 9 additions and 42 deletions.
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

0 comments on commit 7f7a010

Please sign in to comment.