Skip to content

chore: change package manager min version #2

chore: change package manager min version

chore: change package manager min version #2

Workflow file for this run

name: Publish Configurations on Release
on:
push:
branches:
- main
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
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: Setup Git
run: |
git config user.email "actions@github.com"
git config user.name "GitHub Actions"
- name: Generate tag and release body
run: |
pnpm release
- name: Publish tag
id: publish_tag
run: |
git push --follow-tags origin main
echo ::set-output name=tag::$(git describe HEAD --abbrev=0)
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: Release ${{ steps.publish_tag.outputs.tag }}
tag_name: ${{ steps.publish_tag.outputs.tag }}
body_path: CHANGELOG.md
draft: false
prerelease: false
- name: Login to npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish Configuration to NPM
run: pnpm publish --verbose --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}