v1.0.0-alpha.23 #30
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
on: | |
release: | |
types: [created] | |
name: Upload Release Assets | |
jobs: | |
build: | |
name: Upload Release Asset | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup Node for plugin | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.11' | |
cache: 'npm' | |
cache-dependency-path: './plugin' | |
- working-directory: './plugin' | |
run: npm ci && npm run build | |
- name: Build plugin | |
working-directory: './plugin' | |
run: zip -r ../plugin.zip . [email protected] | |
- name: Setup Node for theme | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.11' | |
cache: 'npm' | |
cache-dependency-path: './theme' | |
- working-directory: './theme' | |
run: npm ci && npm run build:css | |
- name: Build Theme | |
working-directory: './theme' | |
run: zip -r ../theme.zip . [email protected] | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Upload Plugin Artifact | |
id: upload-plugin-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{steps.get_release.outputs.upload_url }} | |
asset_path: ./plugin.zip | |
asset_name: wpcloud-station-plugin.zip | |
asset_content_type: application/zip | |
- name: Upload Theme Artifact | |
id: upload-theme-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{steps.get_release.outputs.upload_url }} | |
asset_path: ./theme.zip | |
asset_name: wpcloud-station-theme.zip | |
asset_content_type: application/zip |