0.0.9-rc.2 • Published 2 years ago
@artusx/rush-utils v0.0.9-rc.2
@artusx/rush-utils
Usages
install
npm i -g @artusx/rush-utilsrelease / publish
cd ~/rush-project
# release
artusx-rush-utils release
# publish
artusx-rush-utils publishuse with rush project
create rush autoinstaller
cd ~/rush-project
# install utils
rush init-autoinstaller --name rush-utils
cd common/autoinstallers/rush-utils
pnpm i @artusx/rush-utils
# update deps
rush update-autoinstaller --name rush-utilsadd custom commmands
// common/config/rush/command-line.json
{
  "commands": [
    {
      "name": "release-package",
      "commandKind": "global",
      "summary": "custom release for artusx, This command invokes @artusx/rush-utils to release tag.",
      "safeForSimultaneousRushProcesses": true,
      "autoinstallerName": "rush-utils",
      "shellCommand": "artusx-rush-utils release -n ${name}"
    },
    {
      "name": "publish-package",
      "commandKind": "global",
      "summary": "custom publish for artusx, This command invokes @artusx/rush-utils to publish npm package.",
      "safeForSimultaneousRushProcesses": true,
      "autoinstallerName": "rush-utils",
      "shellCommand": "artusx-rush-utils publish -r ${registry}"
    },
  ]
}update version and publish
# bump version 
rush version --bump
# release tag (publish with CI runner)
rush release-package
# publish npm (publish with npm token, $NPM_AUTH_TOKEN is required.)
rush publish-packageadd to github / gitlab pipeline.
Rush prepare is used to copy .npmrc-publish to .npmrc
# .github/workflows/release.yml
name: Release
on:
  push:
    tags:
      - v1.*
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 2
      - name: Git config user
        run: |
          git config --local user.name "artusxbot"
          git config --local user.email "artusxbot@users.noreply.github.com"
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - name: Verify Change Logs
        run: node common/scripts/install-run-rush.js change --verify
      - name: Rush Install
        run: node common/scripts/install-run-rush.js install
      - name: Rush rebuild
        run: node common/scripts/install-run-rush.js rebuild      
      - name: Rush publish
        env:
          NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
        run: |
          node common/scripts/install-run-rush.js publish        
          node common/scripts/install-run-rush.js publish-package## .gitlab-ci.yml
release:
  stage: deploy
  needs: ['ci']
  tags:    
    - nodejs
  rules:
    - if: '$CI_COMMIT_TAG =~ /^(latest\/|beta\/|next\/|alpha\/|test\/|dev\/|rc\/|v)?(.+@)?\d+\.\d+\.\d+(.+)?$/'
  variables:
    NODE_VERSION: 18
  script:
    - node common/scripts/install-run-rush.js change --verify
    - node common/scripts/install-run-rush.js install
    - node common/scripts/install-run-rush.js rebuild
    - node common/scripts/install-run-rush.js publish    
    - node common/scripts/install-run-rush.js publish-package
    - node common/scripts/install-run-rush.js sync0.0.10
2 years ago
0.0.9-rc.4
2 years ago
0.0.11
2 years ago
0.0.9-rc.5
2 years ago
0.0.10-rc.2
2 years ago
0.0.9
2 years ago
0.0.9-rc.3
2 years ago
0.0.9-rc.2
2 years ago
0.0.9-rc.1
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5-beta.2
2 years ago
0.0.5-beta.1
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago