Publish Version #67
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 | |
| packages: | |
| description: 'Comma-separated list of packages to publish (e.g. @testring/cli,@testring/api). Leave empty to publish all.' | |
| required: false | |
| default: '' | |
| 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: '24.x' | |
| 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 ci | |
| - run: npm run build:main | |
| - run: npm run publish:version ${{ github.event.inputs.version }} | |
| - name: Publish to npm | |
| run: | | |
| ARGS="--exclude=@testring/devtool-frontend,@testring/devtool-backend,@testring/devtool-extension" | |
| if [ -n "${{ github.event.inputs.packages }}" ]; then | |
| ARGS="$ARGS --include=${{ github.event.inputs.packages }}" | |
| fi | |
| node ./utils/publish.js $ARGS | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |