-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (55 loc) · 2.26 KB
/
generate-zip.yml
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
70
name: Generate ZIP for Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
attestations: write
contents: write
id-token: write
timeout-minutes: 70
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build PHP
run: composer install --no-dev --optimize-autoloader
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install packages w/ Bun
run: bun install
- name: Build with Bun
run: bun run build
- name: Create release ZIP
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: 'farcaster-wp.zip'
exclusions: '/*node_modules/* composer.* readme.md package.json .gitignore .eslintrc.js .nvmrc .stylelintrc.json phpcs.xml tsconfig.json bun.lockb .vscode/ .vscode/* .wordpress-org/ .wordpress-org/* src/ src/* src/components/ src/components/* src/hooks/ src/hooks/* src/utils/ src/utils/* /*.git/* /*.github/*'
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: farcaster-wp
path: farcaster-wp.zip
- name: Upload to release
run: gh release upload ${{ github.event.release.tag_name }} farcaster-wp.zip
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
- name: Unzip folder for WP.org
uses: montudor/action-zip@v1
with:
args: unzip -qq farcaster-wp.zip -d farcaster-wp
- name: Upload plugin to WP.org
id: deploy
uses: 10up/[email protected]
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: farcaster-wp
BUILD_DIR: ./farcaster-wp
- name: Attest build provenance
uses: johnbillion/[email protected]
with:
zip-path: ${{ steps.deploy.outputs.zip-path }}