Publish Version #62
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Version | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: Version | |
| default: 0.6.0 | |
| required: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| package-manager-cache: false | |
| - name: Config git user | |
| run: | | |
| git config --global user.name "${{ github.actor }}" | |
| git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
| - run: npm install -g npm@^11.10.0 | |
| - run: npm ci | |
| - run: npm run build:main | |
| - run: npm run publish:version ${{ github.event.inputs.version }} | |
| - name: Publish to npm | |
| run: npm run publish:ci | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |