Merge pull request #3 from weprodev/refactor/consolidate-translation-… #11
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 Package | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| # 1. Checkout repo | |
| - uses: actions/checkout@v4 | |
| # 2. Setup Node.js | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org/ | |
| # 3. Install dependencies | |
| - name: Install dependencies | |
| run: npm ci | |
| # 4. Build package | |
| - name: Build package | |
| run: npm run build | |
| # 5. Run tests | |
| - name: Run tests | |
| run: npm test | |
| # 6. Publish package (only on tags) | |
| - name: Publish package | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |