Add CI and Fix SIWE validation (#129) #65
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: New Release | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
outputs: | |
release_created: ${{ steps.release.outputs.release_created }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Release | |
id: release | |
uses: google-github-actions/release-please-action@v3 | |
with: | |
command: manifest | |
release-type: node | |
- name: Debug Output | |
run: echo "Release Created - ${{ steps.release.outputs.release_created }}" | |
publish-npm: | |
needs: release | |
name: Publish to npm | |
runs-on: ubuntu-latest | |
if: ${{ needs.release.outputs.release_created == 'true' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9.9.0 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm build | |
- name: Publish Core to npm | |
working-directory: ./packages/core | |
run: pnpm publish --report-summary --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish React to npm | |
working-directory: ./packages/react | |
run: pnpm publish --report-summary --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
publish-github: | |
needs: release | |
name: Publish to GitHub Package Registry | |
runs-on: ubuntu-latest | |
if: ${{ needs.release.outputs.release_created == 'true' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9.9.0 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
registry-url: 'https://npm.pkg.github.com' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm build | |
- name: Publish Core to GitHub | |
working-directory: ./packages/core | |
run: pnpm publish --report-summary --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish React to GitHub | |
working-directory: ./packages/react | |
run: pnpm publish --report-summary --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |