Skip to content

ts/types: attempting to appease TypeScript so it is happy about the t… #26

ts/types: attempting to appease TypeScript so it is happy about the t…

ts/types: attempting to appease TypeScript so it is happy about the t… #26

Workflow file for this run

name: Node.js CI
on: [ push ]
jobs:
build_test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ '20.x', '21.x','22.x' ]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run test
maybe_release:
if: "${{ contains(github.ref, 'main') }}"
needs:
- build_test
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/github-tag-action@v1 # Don't use @master or @v1 unless you're happy to test the latest version
id: version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token
WITH_V: true
DEFAULT_BUMP: patch
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: "npm --no-git-tag-version version $(echo ${{ steps.version.outputs.tag }} | sed 's/v//g')"
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Github Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.tag }}