feat: docs/prompt-guide MD authoring and install sync to layer YAML #7
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
| # Publish @pelagornis/prompt-guide to npm when a version tag (v*) is pushed. | |
| # Required: Add NPM_TOKEN (npm Automation token from https://www.npmjs.com/account/tokens) to repo Secrets. | |
| name: Release to npm | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| permissions: | |
| contents: read | |
| jobs: | |
| publish: | |
| name: Publish @pelagornis/prompt-guide to npm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Set version from tag | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| VERSION="${TAG#v}" | |
| npm version "$VERSION" --no-git-tag-version --allow-same-version -w @pelagornis/prompt-guide | |
| echo "Publishing @pelagornis/prompt-guide@$VERSION" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Publish to npm | |
| run: npm publish -w @pelagornis/prompt-guide --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }} |