-
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.
- Loading branch information
kerkness
committed
Aug 13, 2021
1 parent
bf90530
commit 5730c37
Showing
9 changed files
with
68 additions
and
43 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/.wordpress-org | ||
/.git | ||
/.github | ||
/node_modules | ||
|
||
.distignore | ||
.gitignore |
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 |
---|---|---|
@@ -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 |
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,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