Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release plugin zip

# Builds an installable emdash-exporter.zip (plugin folder at the archive
# root, so WordPress' "Upload Plugin" accepts it) on every tag push, and as
# a downloadable artifact on pull requests for testing.

on:
push:
tags:
- "v*"
pull_request:

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: PHP syntax check
run: |
find plugins/emdash-exporter -name '*.php' -print0 | xargs -0 -n1 php -l

- name: Build zip
run: |
cd plugins
zip -r ../emdash-exporter.zip emdash-exporter

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: emdash-exporter
path: emdash-exporter.zip

- name: Create release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: emdash-exporter.zip
generate_release_notes: true