Remove .DS_Store from git tracking #5
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: Publish to NPM | |
| on: | |
| push: | |
| tags: | |
| - "v*" # Triggers on version tags like v1.0.0, v2.1.3, etc. | |
| workflow_dispatch: # Allows manual triggering from GitHub Actions UI | |
| jobs: | |
| build: | |
| name: Build Package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "16" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build package | |
| run: npm run build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-artifacts | |
| path: | | |
| build/ | |
| package.json | |
| package-lock.json | |
| retention-days: 1 | |
| publish: | |
| name: Publish to NPM | |
| runs-on: ubuntu-latest | |
| needs: build | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "16" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-artifacts | |
| - name: Verify NPM authentication | |
| run: npm whoami | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.BUILD_NPM_TOKEN }} | |
| - name: Publish to NPM | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.BUILD_NPM_TOKEN }} | |
| - name: Send Slack notification | |
| if: success() | |
| env: | |
| SLACK_NOTIFY_URL: ${{ secrets.SLACK_NOTIFY_URL }} | |
| SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} | |
| run: .github/scripts/slack-notify.sh | |
| - name: Extract version | |
| id: version | |
| run: | | |
| if [[ "${{ github.ref_type }}" == "tag" ]]; then | |
| VERSION="${{ github.ref_name }}" | |
| else | |
| # For manual runs, extract version from package.json | |
| VERSION="v$(node -p "require('./package.json').version")" | |
| fi | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| echo "version_number=${VERSION#v}" >> $GITHUB_OUTPUT | |
| - name: Create GitHub Release | |
| if: success() | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.version.outputs.version }} | |
| name: ${{ steps.version.outputs.version }} | |
| body: | | |
| ## Overview | |
| This release updates the TypeScript schema interfaces to reflect the latest definitions from the Control Plane core specification. It ensures consistency with the current OpenAPI models used across Control Plane projects. | |
| ## Installation | |
| ```bash | |
| npm install @controlplane/schema@${{ steps.version.outputs.version_number }} | |
| ``` | |
| ## Links | |
| - **npm package**: https://www.npmjs.com/package/@controlplane/schema | |
| draft: false | |
| prerelease: false |