v0.0.36 #38
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |