Add full-screen TUI mode (v0.3.0) #1
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: Release | |
| # Publishes to npm when a version tag (e.g. v0.2.1) is pushed. | |
| # | |
| # Setup (one time): | |
| # 1. Create an npm "Automation" access token for the @geekyants org | |
| # (npmjs.com → Access Tokens → Generate → Automation). Automation tokens | |
| # bypass 2FA/OTP, which is what lets CI publish unattended. | |
| # 2. Add it as a repo secret named NPM_TOKEN | |
| # (Settings → Secrets and variables → Actions → New repository secret). | |
| # | |
| # Cut a release: | |
| # npm version patch # bumps package.json + creates a vX.Y.Z commit & tag | |
| # git push --follow-tags | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write # create the GitHub Release | |
| id-token: write # npm provenance (public package + public repo) | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: "https://registry.npmjs.org" | |
| cache: npm | |
| - name: Verify tag matches package.json version | |
| run: | | |
| PKG_VERSION="$(node -p "require('./package.json').version")" | |
| TAG_VERSION="${GITHUB_REF_NAME#v}" | |
| echo "package.json: $PKG_VERSION | tag: $TAG_VERSION" | |
| if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then | |
| echo "::error::Tag $GITHUB_REF_NAME does not match package.json version $PKG_VERSION" | |
| exit 1 | |
| fi | |
| - run: npm ci | |
| - run: npm run build | |
| - name: Publish to npm | |
| run: npm publish --provenance --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Create GitHub Release | |
| run: gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --generate-notes | |
| env: | |
| GH_TOKEN: ${{ github.token }} |