Skip to content

Prevent lerna from using stale tokens #147

Prevent lerna from using stale tokens

Prevent lerna from using stale tokens #147

Workflow file for this run

name: Publish new version
on:
push:
branches:
- master
- debug-publish
permissions:
contents: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: reattach HEAD
run: |
git checkout "${GITHUB_REF:11}"
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
run: |
yarn install --frozen-lockfile --ignore-engines
- name: Configure Git User
run: |
git config --local user.email dmitriy.chekin@csssr.io
git config --local user.name csssr-team
- name: Configure commits signing
run: |
export GPG_TTY=$(tty)
echo -e "$GPG_PRIVATE_KEY" | gpg --batch --import
echo "" | gpg --clearsign --passphrase $GPG_PASSPHRASE --pinentry-mode loopback
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Publish new version if required
run: |
yarn lerna version --conventional-commits --allow-branch=master --no-changelog --sign-git-commit --sign-git-tag --no-push --yes
yarn release
env:
NPM_CONFIG_PROVENANCE: true
NPM_CONFIG_REGISTRY: https://registry.npmjs.org/
NPM_CONFIG_ACCESS: public
NPM_CONFIG_TOKEN: ""
NODE_AUTH_TOKEN: ""
- name: Push changes
run: |
git remote add pub https://csssr-team:${{ secrets.GITHUB_TOKEN }}@github.com/csssr-dreamteam/core-design.git
git push pub HEAD:master --follow-tags --no-verify