-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 2.08 KB
/
Copy pathrelease.yaml
File metadata and controls
69 lines (60 loc) · 2.08 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
69
name: Release to WordPress.org
on:
release:
types: [published]
workflow_dispatch:
inputs:
dry_run:
description: "Skip SVN commit (test build only)"
type: boolean
default: true
permissions:
contents: write
jobs:
deploy:
name: Deploy to WordPress.org
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event.release.prerelease != true
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.event.release.tag_name || github.ref }}
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: npm
cache-dependency-path: tebuto-online-terminbuchung/block/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build plugin
run: ./scripts/build.sh --keep-build-dir
- name: Verify version consistency
run: |
if [ "${{ github.event_name }}" = "release" ]; then
./scripts/bump-version.sh --check --release-tag "${{ github.event.release.tag_name }}"
else
./scripts/bump-version.sh --check
fi
echo "VERSION=$(./scripts/bump-version.sh --print-version)" >> "$GITHUB_ENV"
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
dry-run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run || false }}
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: tebuto-online-terminbuchung
BUILD_DIR: .build/tebuto-online-terminbuchung
ASSETS_DIR: tebuto-online-terminbuchung/assets-wporg
VERSION: ${{ env.VERSION }}
- name: Upload release asset
if: github.event_name == 'release'
uses: softprops/action-gh-release@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ steps.deploy.outputs.zip-path }}