Merge pull request #190 from TrustNXT/dependabot/npm_and_yarn/typescr… #112
This file contains 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 | |
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.published == 'true' | |
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 }} |