Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHANGELOG: ${{ steps.changelog.outputs.body }}
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.event.repository.name }}
run: |
# Extract PR numbers from changelog links like [#123](...).
# A changelog without matching links has no contributors to fetch.
Expand All @@ -92,7 +94,7 @@ jobs:
CONTRIBUTORS=""
if [ -n "$PR_NUMBERS" ]; then
# Build a single GraphQL query to fetch all PR authors.
QUERY='{ repository(owner: "${{ github.repository_owner }}", name: "${{ github.event.repository.name }}") {'
QUERY="{ repository(owner: \"$REPO_OWNER\", name: \"$REPO_NAME\") {"
while IFS= read -r PR; do
[ -n "$PR" ] && QUERY="$QUERY pr$PR: pullRequest(number: $PR) { author { login } }"
done <<< "$PR_NUMBERS"
Expand All @@ -110,9 +112,10 @@ jobs:
MERGE_SHA: ${{ github.event.pull_request.merge_commit_sha }}
BODY: ${{ steps.changelog.outputs.body }}
CONTRIBUTORS: ${{ steps.contributors.outputs.list }}
PRERELEASE: ${{ steps.version.outputs.prerelease }}
run: |
PRERELEASE_FLAG=""
if [[ "${{ steps.version.outputs.prerelease }}" == "true" ]]; then
if [[ "$PRERELEASE" == "true" ]]; then
PRERELEASE_FLAG="--prerelease"
fi

Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release-wporg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ jobs:

- name: Resolve tag
id: resolve
env:
INPUT_TAG: ${{ inputs.tag }}
run: |
TAG="${{ inputs.tag }}"
TAG="$INPUT_TAG"
# Ensure the tag has a "v" prefix.
[[ "$TAG" == v* ]] || TAG="v$TAG"
echo "tag=$TAG" >> $GITHUB_OUTPUT
Expand All @@ -50,16 +52,19 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ steps.resolve.outputs.tag }}
REPO: ${{ github.repository }}
run: |
gh release download "$TAG" \
--repo "${{ github.repository }}" \
--repo "$REPO" \
--pattern "plugin-sqlite-database-integration.zip" \
--dir .
unzip plugin-sqlite-database-integration.zip

- name: Verify release metadata
env:
VERSION: ${{ steps.resolve.outputs.version }}
run: |
bash bin/verify-release-metadata.sh plugin-sqlite-database-integration "${{ steps.resolve.outputs.version }}"
bash bin/verify-release-metadata.sh plugin-sqlite-database-integration "$VERSION"

- name: Deploy to WordPress.org
uses: 10up/action-wordpress-plugin-deploy@2.3.0
Expand Down
Loading