Merge pull request #32 from MakerXStudio/fix-latest-changes-not-released #41
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 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
name: Release package to NPM | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js latest LTS version | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Restore packages | |
run: npm ci | |
- name: Restore local packages | |
run: npm run install-local-packages | |
- name: Run lint | |
run: npm run lint | |
- name: Build package | |
run: npm run build | |
- name: Publish @makerx/eslint-config (if version has been updated) | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
package: 'packages/eslint/package.json' | |
access: 'public' | |
check-version: true | |
- name: Publish @makerx/prettier-config (if version has been updated) | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
package: 'packages/prettier/package.json' | |
access: 'public' | |
check-version: true | |
- name: Publish @makerx/ts-toolkit (if version has been updated) | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
access: 'public' | |
package: 'dist/package.json' | |
check-version: true |