-
Notifications
You must be signed in to change notification settings - Fork 60
68 lines (60 loc) · 1.85 KB
/
release-wporg.yml
File metadata and controls
68 lines (60 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Deploy to WordPress.org
on:
workflow_call:
inputs:
tag:
required: true
type: string
workflow_dispatch:
inputs:
tag:
description: 'Tag to deploy (e.g., v2.2.21)'
required: true
type: string
concurrency:
group: release-wporg
cancel-in-progress: false
jobs:
deploy:
name: Deploy plugin to WordPress.org
if: github.repository == 'WordPress/sqlite-database-integration'
runs-on: ubuntu-latest
environment: WordPress.org
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
sparse-checkout: bin/
sparse-checkout-cone-mode: false
- name: Resolve tag
id: resolve
run: |
TAG="${{ inputs.tag }}"
# Ensure the tag has a "v" prefix.
[[ "$TAG" == v* ]] || TAG="v$TAG"
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: Download plugin zip from release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ steps.resolve.outputs.tag }}
run: |
gh release download "$TAG" \
--repo "${{ github.repository }}" \
--pattern "plugin-sqlite-database-integration.zip" \
--dir .
unzip plugin-sqlite-database-integration.zip
- name: Verify release metadata
env:
TAG: ${{ steps.resolve.outputs.tag }}
run: |
VERSION="${TAG#v}"
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
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: sqlite-database-integration
BUILD_DIR: plugin-sqlite-database-integration