Skip to content

feat:[00] Install pnpm #13

feat:[00] Install pnpm

feat:[00] Install pnpm #13

Workflow file for this run

name: Deployment Workflow
on:
push:
branches:
- test-workflow
workflow_dispatch:
jobs:
build:
name: "@mindfiredigital/pivothead-core"
runs-on: ubuntu-latest
permissions:
contents: write
packages: read
steps:
# Step 1: Checkout the repository
- name: "Checkout repository"
uses: actions/checkout@v2
# Step 2: Setup Node.js and pnpm
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
# Step 3: Set up pnpm
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
# Step 4: Install dependencies
- name: "Install dependencies"
run: pnpm install --frozen-lockfile
# Step 5: Create build
- name: "Build application"
run: pnpm run build
# Step 6: Set Git user name and email
- name: "Set Git user name and email"
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
create-github-release:
name: Create Github release document and publish to node
runs-on: ubuntu-latest
permissions:
contents: write
needs: build
steps:
# Step 1: Checkout repository
- name: Checkout code
uses: actions/checkout@v2
# Step 2: Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
# Step 3: Run Semantic Release and npm release
- name: Semantic Release and npm release
run: |
npm ci
npx semantic-release
# env:
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Step 4: Upload build artifacts as a ZIP file
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: core-build-zip # Name of the artifact
path: ./packages/core/dist # Path to the build folder to zip and upload