Release 0.3.0 #19
Workflow file for this run
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: Publish to npm and GitHub | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
defaults: | |
run: | |
working-directory: ./packages/nextjs-themes | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org | |
- run: npm i -g pnpm && pnpm i --filter nextjs-themes | |
name: Install dependencies | |
- name: Test | |
run: npm test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Setup Git | |
run: | | |
git config --global user.name "mayank1513" | |
git config --global user.email "[email protected]" | |
git fetch | |
git checkout main | |
- name: update version and push back to the repo | |
run: cp -r ../../.changeset . && pnpm changeset version && git push origin main | |
- name: Publish to npm | |
run: pnpm build && pnpm publish-package && pnpm publish-package2 | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} | |
- uses: actions/setup-node@v3 | |
with: | |
registry-url: https://npm.pkg.github.com/ | |
- name: Publish to GitHub Public Repository | |
run: pnpm publish-gpr && pnpm publish-gpr2 | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
# Publish lite versions | |
- run: node lite.js | |
- uses: actions/setup-node@v3 | |
with: | |
registry-url: https://registry.npmjs.org | |
- name: Publish to npm | |
run: pnpm build && pnpm publish-package && pnpm publish-package2 | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} | |
- uses: actions/setup-node@v3 | |
with: | |
registry-url: https://npm.pkg.github.com/ | |
- name: Publish to GitHub Public Repository | |
run: pnpm publish-gpr && pnpm publish-gpr2 | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |