fix: remove redundant test step from npm publish workflow #4
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: workflow - publish npm comanda sdk package | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - development | |
| paths: | |
| - 'Artifacts/Comanda.Internal.Sdk/**' | |
| pull_request: | |
| branches: | |
| - master | |
| - development | |
| paths: | |
| - 'Artifacts/Comanda.Internal.Sdk/**' | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: Artifacts/Comanda.Internal.Sdk | |
| steps: | |
| - name: checkout repository | |
| uses: actions/checkout@v4 | |
| - name: setup node.js environment | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: "https://registry.npmjs.org" | |
| - name: install dependencies | |
| run: npm install | |
| - name: build | |
| run: npm run build | |
| - name: prepare git for version bump | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add -A | |
| git commit -m "ci: prepare repository for version bump" || echo "no changes to commit" | |
| - name: bump version | |
| run: | | |
| if [ "${{ github.ref_name }}" = "master" ]; then | |
| npm version minor -m "ci: bump minor version to %s" | |
| elif [ "${{ github.ref_name }}" = "development" ]; then | |
| npm version patch -m "ci: bump patch version to %s" | |
| fi | |
| - name: publish to npm | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: prepare git for version bump | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add -A | |
| git commit -m "ci: prepare repository for version bump" || echo "no changes to commit" |