Skip to content

Commit eea062f

Browse files
author
Your friendly neighborhood GH Actions Bot
committed
Build to 'release' from main#4a4665e
2 parents d6abca5 + 4a4665e commit eea062f

19 files changed

+24213
-23855
lines changed
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
name: Production Build & Release
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
push:
5+
branches:
6+
- main
77

88
concurrency:
9-
group: ${{ github.workflow }}-${{ github.ref_name }}
10-
cancel-in-progress: true
9+
group: ${{ github.workflow }}-${{ github.ref_name }}
10+
cancel-in-progress: true
1111

1212
jobs:
13-
release:
14-
name: "Update release branch"
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: Check out project
18-
uses: actions/checkout@v5
13+
release:
14+
name: 'Update release branch'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out project
18+
uses: actions/checkout@v5
1919

20-
- name: Set up Node
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version: 24
24-
cache: 'npm'
20+
- name: Set up Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 24
24+
cache: 'npm'
2525

26-
- name: Merge and build
27-
uses: humanmade/hm-github-actions/.github/actions/build-to-release-branch@04c32a93e52ae987095f144105745a501d6207c8 # v0.2.0
28-
with:
29-
source_branch: main
30-
release_branch: release
31-
built_asset_paths: build
32-
build_script: |
33-
npm i
34-
npm run build
26+
- name: Merge and build
27+
uses: humanmade/hm-github-actions/.github/actions/build-to-release-branch@04c32a93e52ae987095f144105745a501d6207c8 # v0.2.0
28+
with:
29+
source_branch: main
30+
release_branch: release
31+
built_asset_paths: build
32+
build_script: |
33+
npm i
34+
npm run build
Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,86 @@
11
name: Playwright Tests
22

33
on:
4-
push:
5-
branches: [ main, master, develop ]
6-
pull_request:
7-
branches: [ main, master, develop ]
4+
push:
5+
branches: [main, master, develop]
6+
pull_request:
7+
branches: [main, master, develop]
88

99
jobs:
10-
test:
11-
timeout-minutes: 60
12-
runs-on: ubuntu-latest
13-
permissions:
14-
contents: read
15-
pull-requests: write
16-
17-
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v4
20-
21-
- name: Setup Node.js
22-
uses: actions/setup-node@v4
23-
with:
24-
node-version: 24
25-
cache: 'npm'
26-
27-
- name: Install dependencies
28-
run: npm i
29-
30-
- name: Build plugin
31-
run: npm run build
32-
33-
- name: Install Playwright Browsers
34-
run: npx playwright install --with-deps chromium
35-
36-
- name: Start WordPress environment
37-
run: npm run wp-env start
38-
39-
- name: Wait for WordPress to be ready
40-
run: |
41-
timeout 60 bash -c 'until curl -sSf http://localhost:8889 > /dev/null 2>&1; do sleep 2; done' || echo "WordPress may not be fully ready"
42-
sleep 5
43-
44-
- name: Debug - Check WordPress status
45-
run: |
46-
curl -I http://localhost:8889 || echo "WordPress not responding"
47-
docker ps
48-
49-
- name: Run Playwright tests
50-
id: tests
51-
continue-on-error: true
52-
run: npm run test:e2e
53-
env:
54-
CI: true
55-
56-
- name: Stop WordPress environment
57-
if: always()
58-
run: npm run wp-env stop
59-
60-
- name: Upload test results
61-
uses: actions/upload-artifact@v4
62-
if: always()
63-
with:
64-
name: playwright-report
65-
path: test-results/
66-
retention-days: 30
67-
if-no-files-found: ignore
68-
69-
- name: Upload test videos and traces
70-
uses: actions/upload-artifact@v4
71-
if: failure()
72-
with:
73-
name: test-results
74-
path: test-results/
75-
retention-days: 7
76-
if-no-files-found: ignore
77-
78-
- name: Comment PR with test results
79-
uses: daun/playwright-report-comment@v3
80-
if: always() && github.event_name == 'pull_request'
81-
with:
82-
report-file: test-results/results.json
83-
84-
- name: Fail if tests failed
85-
if: steps.tests.outcome == 'failure'
86-
run: exit 1
10+
test:
11+
timeout-minutes: 60
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 24
25+
cache: 'npm'
26+
27+
- name: Install dependencies
28+
run: npm i
29+
30+
- name: Build plugin
31+
run: npm run build
32+
33+
- name: Install Playwright Browsers
34+
run: npx playwright install --with-deps chromium
35+
36+
- name: Start WordPress environment
37+
run: npm run wp-env start
38+
39+
- name: Wait for WordPress to be ready
40+
run: |
41+
timeout 60 bash -c 'until curl -sSf http://localhost:8889 > /dev/null 2>&1; do sleep 2; done' || echo "WordPress may not be fully ready"
42+
sleep 5
43+
44+
- name: Debug - Check WordPress status
45+
run: |
46+
curl -I http://localhost:8889 || echo "WordPress not responding"
47+
docker ps
48+
49+
- name: Run Playwright tests
50+
id: tests
51+
continue-on-error: true
52+
run: npm run test:e2e
53+
env:
54+
CI: true
55+
56+
- name: Stop WordPress environment
57+
if: always()
58+
run: npm run wp-env stop
59+
60+
- name: Upload test results
61+
uses: actions/upload-artifact@v4
62+
if: always()
63+
with:
64+
name: playwright-report
65+
path: test-results/
66+
retention-days: 30
67+
if-no-files-found: ignore
68+
69+
- name: Upload test videos and traces
70+
uses: actions/upload-artifact@v4
71+
if: failure()
72+
with:
73+
name: test-results
74+
path: test-results/
75+
retention-days: 7
76+
if-no-files-found: ignore
77+
78+
- name: Comment PR with test results
79+
uses: daun/playwright-report-comment@v3
80+
if: always() && github.event_name == 'pull_request'
81+
with:
82+
report-file: test-results/results.json
83+
84+
- name: Fail if tests failed
85+
if: steps.tests.outcome == 'failure'
86+
run: exit 1

.github/workflows/release.yml

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,88 @@
11
name: Version and Release
22

33
on:
4-
release:
5-
types: [created]
4+
release:
5+
types: [created]
66

77
jobs:
8-
version-and-release:
9-
name: Update Version and Create Release Asset
10-
runs-on: ubuntu-latest
11-
permissions:
12-
contents: write
8+
version-and-release:
9+
name: Update Version and Create Release Asset
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
1313

14-
steps:
15-
- name: Checkout code at tag
16-
uses: actions/checkout@v4
17-
with:
18-
ref: ${{ github.event.release.tag_name }}
19-
fetch-depth: 0
14+
steps:
15+
- name: Checkout code at tag
16+
uses: actions/checkout@v4
17+
with:
18+
ref: ${{ github.event.release.tag_name }}
19+
fetch-depth: 0
2020

21-
- name: Get version from tag
22-
id: get_version
23-
run: |
24-
# Extract version from tag (remove 'v' prefix if present)
25-
TAG_NAME="${{ github.event.release.tag_name }}"
26-
VERSION="${TAG_NAME#v}"
21+
- name: Get version from tag
22+
id: get_version
23+
run: |
24+
# Extract version from tag (remove 'v' prefix if present)
25+
TAG_NAME="${{ github.event.release.tag_name }}"
26+
VERSION="${TAG_NAME#v}"
2727
28-
echo "version=$VERSION" >> $GITHUB_OUTPUT
29-
echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT
30-
echo "Version: $VERSION"
31-
echo "Tag: $TAG_NAME"
28+
echo "version=$VERSION" >> $GITHUB_OUTPUT
29+
echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT
30+
echo "Version: $VERSION"
31+
echo "Tag: $TAG_NAME"
3232
33-
- name: Replace __VERSION__ in plugin file
34-
run: |
35-
sed -i "s/__VERSION__/${{ steps.get_version.outputs.version }}/g" hm-query-loop.php
36-
echo "Updated plugin header:"
37-
cat hm-query-loop.php | grep "Version:"
38-
echo "Updated version constant:"
39-
cat hm-query-loop.php | grep "HM_QUERY_LOOP_VERSION"
33+
- name: Replace __VERSION__ in plugin file
34+
run: |
35+
sed -i "s/__VERSION__/${{ steps.get_version.outputs.version }}/g" hm-query-loop.php
36+
echo "Updated plugin header:"
37+
cat hm-query-loop.php | grep "Version:"
38+
echo "Updated version constant:"
39+
cat hm-query-loop.php | grep "HM_QUERY_LOOP_VERSION"
4040
41-
- name: Commit version changes to tag
42-
run: |
43-
git config --local user.email "github-actions[bot]@users.noreply.github.com"
44-
git config --local user.name "github-actions[bot]"
41+
- name: Commit version changes to tag
42+
run: |
43+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
44+
git config --local user.name "github-actions[bot]"
4545
46-
# Add and commit the versioned file
47-
git add hm-query-loop.php
48-
git commit -m "Update version to ${{ steps.get_version.outputs.version }}"
46+
# Add and commit the versioned file
47+
git add hm-query-loop.php
48+
git commit -m "Update version to ${{ steps.get_version.outputs.version }}"
4949
50-
# Delete the old tag and create a new one pointing to the new commit
51-
git tag -d "${{ steps.get_version.outputs.tag }}"
52-
git tag -a "${{ steps.get_version.outputs.tag }}" -m "Release ${{ steps.get_version.outputs.tag }}"
50+
# Delete the old tag and create a new one pointing to the new commit
51+
git tag -d "${{ steps.get_version.outputs.tag }}"
52+
git tag -a "${{ steps.get_version.outputs.tag }}" -m "Release ${{ steps.get_version.outputs.tag }}"
5353
54-
# Force push the updated tag
55-
git push origin "${{ steps.get_version.outputs.tag }}" --force
54+
# Force push the updated tag
55+
git push origin "${{ steps.get_version.outputs.tag }}" --force
5656
57-
- name: Create ZIP archive
58-
run: |
59-
mkdir -p release
57+
- name: Create ZIP archive
58+
run: |
59+
mkdir -p release
6060
61-
# Create a clean copy excluding dev files
62-
rsync -av --exclude='.git' \
63-
--exclude='.github' \
64-
--exclude='node_modules' \
65-
--exclude='src' \
66-
--exclude='release' \
67-
--exclude='.gitignore' \
68-
--exclude='.gitattributes' \
69-
--exclude='package.json' \
70-
--exclude='package-lock.json' \
71-
--exclude='RELEASE.md' \
72-
./ release/hm-query-loop/
61+
# Create a clean copy excluding dev files
62+
rsync -av --exclude='.git' \
63+
--exclude='.github' \
64+
--exclude='node_modules' \
65+
--exclude='src' \
66+
--exclude='release' \
67+
--exclude='.gitignore' \
68+
--exclude='.gitattributes' \
69+
--exclude='package.json' \
70+
--exclude='package-lock.json' \
71+
--exclude='RELEASE.md' \
72+
./ release/hm-query-loop/
7373
74-
# Create ZIP
75-
cd release
76-
zip -r "hm-query-loop-${{ steps.get_version.outputs.tag }}.zip" hm-query-loop/
77-
cd ..
74+
# Create ZIP
75+
cd release
76+
zip -r "hm-query-loop-${{ steps.get_version.outputs.tag }}.zip" hm-query-loop/
77+
cd ..
7878
79-
echo "Created: release/hm-query-loop-${{ steps.get_version.outputs.tag }}.zip"
79+
echo "Created: release/hm-query-loop-${{ steps.get_version.outputs.tag }}.zip"
8080
81-
- name: Upload ZIP to release
82-
uses: softprops/action-gh-release@v1
83-
with:
84-
tag_name: ${{ github.event.release.tag_name }}
85-
files: |
86-
release/hm-query-loop-${{ steps.get_version.outputs.tag }}.zip
87-
env:
88-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
- name: Upload ZIP to release
82+
uses: softprops/action-gh-release@v1
83+
with:
84+
tag_name: ${{ github.event.release.tag_name }}
85+
files: |
86+
release/hm-query-loop-${{ steps.get_version.outputs.tag }}.zip
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)