Skip to content

Commit 74ff03f

Browse files
authored
Merge pull request #408 from Extra-Chill/homeboy-ci-and-release-asset
ci: add Homeboy release workflow and ZIP asset
2 parents aa7d970 + 940ca9a commit 74ff03f

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

.github/workflows/homeboy.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Homeboy
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
tags: ['v*']
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: homeboy-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
14+
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
issues: write
19+
20+
jobs:
21+
homeboy:
22+
uses: Extra-Chill/homeboy-action/.github/workflows/ci.yml@v2
23+
with:
24+
commands: audit,lint,test
25+
expected-commands: audit,lint,test
26+
autofix: 'false'
27+
secrets: inherit
28+
29+
build-release-asset:
30+
if: needs.homeboy.outputs.released == 'true'
31+
needs: [homeboy]
32+
runs-on: ubuntu-latest
33+
permissions:
34+
contents: write
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
ref: ${{ needs.homeboy.outputs.release-tag }}
39+
40+
- uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: '8.3'
43+
tools: composer:v2
44+
45+
- run: composer install --no-dev --optimize-autoloader --prefer-dist --no-interaction
46+
47+
- name: Build plugin ZIP
48+
run: |
49+
mkdir -p dist/data-machine-code
50+
rsync -a ./ dist/data-machine-code/ \
51+
--exclude='.git' \
52+
--exclude='.github' \
53+
--exclude='.claude' \
54+
--exclude='.datamachine' \
55+
--exclude='AGENTS.md' \
56+
--exclude='dist' \
57+
--exclude='docs' \
58+
--exclude='node_modules' \
59+
--exclude='tests' \
60+
--exclude='*.zip' \
61+
--exclude='*.tar.gz' \
62+
--exclude='*.log' \
63+
--exclude='*.tmp' \
64+
--exclude='*.temp' \
65+
--exclude='*.cache' \
66+
--exclude='*.bak' \
67+
--exclude='*.backup' \
68+
--exclude='phpstan-baseline.neon' \
69+
--exclude='phpunit.xml*'
70+
cd dist
71+
zip -r data-machine-code.zip data-machine-code
72+
73+
- run: gh release upload "${{ needs.homeboy.outputs.release-tag }}" dist/data-machine-code.zip --clobber
74+
env:
75+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)