Skip to content

Version 3.5.4

Version 3.5.4 #45

Workflow file for this run

# 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@v4
- name: Build project
run: |
mkdir build
- name: Create artifact
uses: montudor/action-zip@v1
with:
args: zip -X -r build/contextual-related-posts.zip . -x *.git* node_modules/\* .* "*/\.*" CODE_OF_CONDUCT.md CONTRIBUTING.md ISSUE_TEMPLATE.md PULL_REQUEST_TEMPLATE.md *.dist *.yml *.neon composer.* dev-helpers** build** wporg-assets** phpunit**
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: contextual-related-posts
path: build/contextual-related-posts.zip
- name: Upload to release
uses: JasonEtco/upload-to-release@master
with:
args: build/contextual-related-posts.zip application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}