Skip to content

Merge pull request #257 from DestinyItemManager/search-group #128

Merge pull request #257 from DestinyItemManager/search-group

Merge pull request #257 from DestinyItemManager/search-group #128

Workflow file for this run

name: NPM Publish dim-api-types
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
# This will only publish if the package.json version has changed
- name: Check version changes
uses: EndBug/version-check@v2 # More info about the arguments on the action page
id: check # This will be the reference for later
with:
file-name: ./dim-api-types/package.json
file-url: https://unpkg.com/@destinyitemmanager/dim-api-types@latest/package.json
static-checking: localIsNew
- name: pnpm setup
if: steps.check.outputs.changed == 'true'
uses: pnpm/action-setup@v4
- name: Setup Node
if: steps.check.outputs.changed == 'true'
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org/
- name: Install
if: steps.check.outputs.changed == 'true'
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
if: steps.check.outputs.changed == 'true'
run: pnpm dim-api-types:build
- name: Publish the package to NPM
if: steps.check.outputs.changed == 'true'
run: cd dim-api-types && npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # NPM will automatically authenticate with this