chore: remove npm ignore file #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: Publishing Release Candidate | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+" | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.ref }} | |
| - name: Validate Branch 🚨 | |
| run: | | |
| # Get the branch name from the tag | |
| BRANCH_NAME=$(git branch -r --contains ${{ github.ref_name }} | grep -E 'origin/(main|release/.*)' | head -1 | sed 's/origin\///') | |
| if [ -z "$BRANCH_NAME" ]; then | |
| echo "❌ Error: Tag ${{ github.ref_name }} was not created from main or a release/* branch" | |
| exit 1 | |
| fi | |
| echo "✅ Tag ${{ github.ref_name }} is valid - created from branch: $BRANCH_NAME" | |
| - name: Setup pnpm 9 | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.3.0 | |
| - name: Setup Node.js 18.x | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: 18.x | |
| - name: Install Dependencies 🔧 | |
| run: pnpm install | |
| - name: Build Step 🔧 | |
| env: | |
| CI: "" | |
| run: pnpm run ci:build | |
| - name: Create .npmrc | |
| run: | | |
| cat << EOF > "$HOME/.npmrc" | |
| //registry.npmjs.org/:_authToken=$NPM_TOKEN | |
| EOF | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Bump Package Version | |
| run: pnpm run bump-version | |
| working-directory: ./packages/raystack | |
| env: | |
| GIT_REFNAME: ${{ github.ref_name }} | |
| - name: Run Release 🚀 | |
| run: pnpm run release --tag next | |
| working-directory: ./packages/raystack | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Generate GitHub Pre-Release Notes 📓 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release create "$GITHUB_REF_NAME" \ | |
| --repo "$GITHUB_REPOSITORY" \ | |
| --generate-notes \ | |
| --prerelease \ | |
| --verify-tag | |