Skip to content

Merge pull request #137 from TrustNXT/dependabot/npm_and_yarn/peculia… #61

Merge pull request #137 from TrustNXT/dependabot/npm_and_yarn/peculia…

Merge pull request #137 from TrustNXT/dependabot/npm_and_yarn/peculia… #61

Workflow file for this run

name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: read
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version: 22
registry-url: 'https://npm.pkg.github.com'
scope: '@trustnxt'
- name: Install Dependencies
run: npm ci
- name: Create Release Pull Request and publish to GitHub Packages
id: changesets
uses: changesets/action@v1
with:
version: npm run version
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
- name: Publish to npm registry
if: steps.changesets.outputs.hasChangesets == 'false'
run: |
npm config delete @trustnxt:registry --location project
npm config set @trustnxt:registry 'https://registry.npmjs.org' --location project
npm config set //registry.npmjs.org/:_authToken '${NODE_AUTH_TOKEN}' --location project
npm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}