-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy pasta from papc with composer and gitignore mods
- Loading branch information
1 parent
d68ef8f
commit b40ddbe
Showing
1 changed file
with
62 additions
and
0 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,62 @@ | ||
name: Build, Tag and Release | ||
on: | ||
push: | ||
branches: | ||
- release | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
check-status: | ||
name: Check Status | ||
runs-on: ubuntu-latest | ||
outputs: | ||
is-asset-update: ${{ steps.set-outputs.outputs.is-asset-update }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: get-changed-files | ||
uses: jitterbit/get-changed-files@v1 | ||
- id: set-outputs | ||
run: | | ||
echo "Changed files: ${{ steps.get-changed-files.outputs.all }}" | ||
shopt -s nocasematch | ||
run_plugin_update="true" | ||
for file in ${{ steps.get-changed-files.outputs.all }}; do | ||
if | ||
[[ ! "$file" =~ ^\.wordpress\.org/ ]] && \ | ||
[[ ! $file =~ ^\.github/ ]] && \ | ||
[[ "$file" != "readme.txt" ]] && \ | ||
[[ $file != "readme.md" ]] && \ | ||
[[ $file != ".gitignore" ]] && \ | ||
[[ $file != *"composer"* ]]; then | ||
run_plugin_update="false" | ||
break | ||
fi | ||
done | ||
echo "::set-output name=is-asset-update::$run_plugin_update" | ||
asset-only: | ||
name: WP.org Asset Only Update | ||
needs: check-status | ||
if: ${{ needs.check-status.outputs.is-asset-update == 'true' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: WP.org Asset Only Update | ||
uses: 10up/action-wordpress-plugin-asset-update@stable | ||
env: | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
tag: | ||
needs: check-status | ||
if: ${{ needs.check-status.outputs.is-asset-update == 'false' }} | ||
name: Create Tag and Draft Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build, Tag & Release | ||
uses: pantheon-systems/plugin-release-actions/build-tag-release@main | ||
with: | ||
gh_token: ${{ github.token }} | ||
readme_md: README.md |