Skip to content

fix(deps): update node.js to v22 #17

fix(deps): update node.js to v22

fix(deps): update node.js to v22 #17

Workflow file for this run

name: release
on:
push:
branches:
- "main"
- "next"
- "beta"
- "experimental"
tags:
- "v*.*.*"
pull_request:
types:
- labeled
jobs:
release:
if: github.event.action != 'labeled'
runs-on: ubuntu-latest
steps:
- name: Checkout [Default Branch]
uses: actions/checkout@v4
with:
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
fetch-depth: 0
token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }}
- name: Check pnpm version
shell: bash
id: pnpm
working-directory: ./
run: |
PNPM_VERSION=${PNPM_VERSION:-7.30.5}
PKG_JSON=$(cat package.json | jq -r '.packageManager' | awk -F@ '{print $2}')
if [ ! -z $PKG_JSON ]; then
PNPM_VERSION=$PKG_JSON
fi
if [ ! -z {{inputs.packageManager}} ]; then
PNPM_VERSION=${{ inputs.packageManagerVersion }}
fi
echo "Using PNPM version $PNPM_VERSION"
echo "version=$PNPM_VERSION" >> $GITHUB_OUTPUT
- name: Setup PNPM
id: pnpm_setup
uses: pnpm/[email protected]
with:
version: ${{ steps.pnpm.outputs.version }}
run_install: false
package_json_file: ./package.json
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
shell: bash
- name: Get pnpm store directory
shell: bash
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Set up npm registry
uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version-file: .github/.nvmrc
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Setup pnpm config registry
run: pnpm config set registry https://registry.npmjs.org
shell: bash
- name: Build repository
run: pnpm build
shell: bash
# Bump version on merging Pull Requests with specific labels.
# (bump:major,bump:minor,bump:patch)
- id: bumpr
if: "!startsWith(github.ref, 'refs/tags/')"
uses: haya14busa/action-bumpr@v1
# Update corresponding major and minor tag.
# e.g. Update v1 and v1.2 when releasing v1.2.3
- uses: haya14busa/action-update-semver@v1
if: "!steps.bumpr.outputs.skip"
with:
tag: ${{ steps.bumpr.outputs.next_version }}
# Get tag name.
- id: tag
uses: haya14busa/action-cond@v1
with:
cond: "${{ startsWith(github.ref, 'refs/tags/') }}"
if_true: ${{ github.ref }}
if_false: ${{ steps.bumpr.outputs.next_version }}
# Create release.
- uses: shogo82148/actions-create-release@v1
if: "steps.tag.outputs.value != ''"
with:
# This token is provided by Actions, you do not need to create your own token
github_token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }}
tag_name: ${{ steps.tag.outputs.value }}
release_name: Release ${{ steps.tag.outputs.value }}
body: ${{ steps.bumpr.outputs.message }}
draft: false
prerelease: false
release-check:
if: github.event.action == 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Post bumpr status comment
uses: haya14busa/action-bumpr@v1