fix: trim theme.zip on prod #4
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
# CWordPress theme packager workflow | |
name: Package WordPress Theme | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: composer install --no-dev | |
- name: Build theme | |
run: npm ci && npm run build | |
- name: Run package.py | |
run: python package.py | |
- name: Create release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: Release ${{ github.sha }} | |
files: theme.zip | |
tag_name: release-${{ github.sha }} | |
draft: false | |
prerelease: false | |
- name: Get the URL of the created release | |
run: echo "The release is at ${{ steps.create_release.outputs.html_url }}" |