Skip to content

Create Release on Tag Push #130

Create Release on Tag Push

Create Release on Tag Push #130

Workflow file for this run

name: Create Release on Tag Push
on:
push:
tags:
- "v*"
env:
PROJ_PATH: sy-tomato-plugin
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout workspace repo # https://github.com/marketplace/actions/checkout#checkout-multiple-repos-side-by-side
uses: actions/checkout@v4
with:
repository: IAliceBobI/sy-plugins
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: |
cd $PROJ_PATH
pnpm install
- name: Build for production
run: |
cd $PROJ_PATH
pnpm build
mv package.zip ..
- name: Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: "package.zip"
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false