Skip to content

Release creation on tag push; use ncipollo/release-action@v1.14.0 #5

Release creation on tag push; use ncipollo/release-action@v1.14.0

Release creation on tag push; use ncipollo/release-action@v1.14.0 #5

Workflow file for this run

name: Create WPSEO.AI Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install PNPM
uses: pnpm/action-setup@v3
with:
version: 7
run_install: false
- name: Get PNPM store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup PNPM cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build dependencies
run: pnpm build
# - name: Create plugin directory
# run: mkdir ai-seo-wp
# - name: Add dist and archive assets to plugin directory
# run: cp -R dist ./ai-seo-wp/ && cp -R ./archive-output/*/* ./ai-seo-wp/
# - name: Zip plugin directory
# run: zip -r ai-seo-wp.zip ./ai-seo-wp
- name: Package Repository
run: zip -r ai-seo-wp.zip ./* -x "*.cache*" -x "*.git*" -x "*.gitattributes*" -x "*.github*" -x "*.gitignore*" -x "*.json*" -x "*.xml*" -x "*.yaml*" -x "*.yml*" -x "./bin*" -x "./composer.lock*" -x "./log*" -x "./node_modules*" -x "./scripts*" -x "./src*" -x "./tests*"
# run: zip -r ai-seo-wp.zip ./* -x "*.cache*" -x "*.git*" -x "*.gitattributes*" -x "*.github*" -x "*.gitignore*" -x "*.json*" -x "*.xml*" -x "*.yaml*" -x "*.yml*" -x "*bin*" -x "*log*" -x "*node_modules*" -x "./scripts" -x "./src" -x "./tests"
- name: Create Release
uses: ncipollo/release-action@v1.14.0
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ github.ref }}
draft: false
prerelease: false
body: "Version `${{ github.ref }}`, for more details: https://wpseo.ai/get-wordpress-plugin.html"
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: ai-seo-wp.zip