Skip to content

ci: add git authors #12

ci: add git authors

ci: add git authors #12

Workflow file for this run

name: Publish Stable
on:
push:
branches:
- main
- stable
jobs:
publish:
strategy:
fail-fast: false
matrix:
include:
- package: '@lasfoiawbp/test1'
folder: 'packages/test1'
- package: '@lasfoiawbp/test2'
folder: 'packages/test2'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
always-auth: true
cache: pnpm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Install Dependencies
run: pnpm install
- name: Build Project
run: pnpm --filter $${{ matrix.package }} build
- name: Publish package
id: release
run: |
cd ${{ matrix.folder }}
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if [[ "${{ github.ref_name }}" == "stable" ]]; then
pnpm dlx @favware/cliff-jumper \
--name "${{ matrix.package }}" \
--package-path "${{ matrix.folder }}"
else
pnpm dlx @favware/cliff-jumper \
--name "${{ matrix.package }}" \
--package-path "${{ matrix.folder }}"
--preid dev
fi
pnpm publish --provenance --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}