Skip to content

Commit

Permalink
svn
Browse files Browse the repository at this point in the history
  • Loading branch information
kerkness committed Aug 13, 2021
1 parent bf90530 commit 5730c37
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 43 deletions.
7 changes: 7 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/.wordpress-org
/.git
/.github
/node_modules

.distignore
.gitignore
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy to WordPress.org
on:
release:
types: [published]
jobs:
tag:
name: New release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build
run: |
composer install --no-dev --optimize-autoloader
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
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: ${{github.workspace}}/${{ github.event.repository.name }}.zip
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip
73 changes: 30 additions & 43 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,31 @@
# GitHub Action: whenever creating a new release of the source code,
# also create a release of the installable plugin.
# Steps to execute:
# - Checkout the source code
# - Run "composer install" to download all dependencies under vendor/
# - Create a .zip file, excluding:
# - All hidden files (.git, .gitignore, etc)
# - All development files, ending in .dist
# - All composer files <= after installing dependencies, no need for them anymore
# - Markdown files concerning development
# - Folder build/ <= created only to store the .zip file
# - Folder dev-helpers/ <= not needed for the plugin
# - Upload the .zip file as an artifact to the action (this step is possibly optional)
# - Upload the .zip file as a release, for download
name: Generate Installable Plugin, and Upload as Release Asset
on:
release:
types: [published]
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build project
run: |
composer install --no-dev --optimize-autoloader
mkdir build
- name: Create artifact
uses: montudor/[email protected]
with:
args: zip -X -r build/wc-slack.zip . -x assets** *.git* node_modules/\* .* "*/\.*" *.package* *.dist composer.* dev-helpers** build**
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: WCSlack Zip
path: build/wc-slack.zip
- name: Upload to release
uses: JasonEtco/upload-to-release@master
with:
args: build/wc-slack.zip application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# name: Generate Installable Plugin, and Upload as Release Asset
# on:
# release:
# types: [published]
# jobs:
# build:
# name: Upload Release Asset
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
# - name: Build project
# run: |
# composer install --no-dev --optimize-autoloader
# mkdir build
# - name: Create artifact
# uses: montudor/[email protected]
# with:
# args: zip -X -r build/wc-slack.zip . -x assets** *.git* node_modules/\* .* "*/\.*" *.package* *.dist composer.* dev-helpers** build**
# - name: Upload artifact
# uses: actions/upload-artifact@v2
# with:
# name: WCSlack Zip
# path: build/wc-slack.zip
# - name: Upload to release
# uses: JasonEtco/upload-to-release@master
# with:
# args: build/wc-slack.zip application/zip
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 5730c37

Please sign in to comment.