GitHub Packages Publish Only #6
Workflow file for this run
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: GitHub Packages Publish Only | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to publish (e.g., 1.0.2)' | |
| required: true | |
| default: '1.0.2' | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| publish-github-packages: | |
| name: Publish to GitHub Packages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js for GitHub Packages | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| registry-url: 'https://npm.pkg.github.com' | |
| scope: '@syrex1013' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test | |
| - name: Build package | |
| run: npm run build | |
| - name: Run linting | |
| run: npm run lint | |
| - name: Publish to GitHub Packages | |
| run: npm publish | |
| - name: Verify GitHub Packages publication | |
| run: | | |
| echo "✅ Package published to GitHub Packages successfully!" | |
| echo "Version: $(node -p "require('./package.json').version")" | |
| echo "GitHub Packages URL: https://github.com/syrex1013/bolt-driver-api-sdk/packages" |