Skip to content

fix: remove unnecessary git coords during on-push workflow #143

fix: remove unnecessary git coords during on-push workflow

fix: remove unnecessary git coords during on-push workflow #143

name: build-test-on-pr
on: [ pull_request, workflow_dispatch ]
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8
- name: 'Publish @latest when on main'
if: github.ref == 'refs/heads/main'
run: echo "main"
- name: 'Give github.ref'
run: |
echo 'github ref'
gref = github.ref
echo "$gref"
- name: 'Publish @next when on next'
if: github.ref == 'refs/heads/next'
run: pnpm publish:next
- name: 'Setup git coordinates'
run: |
echo user: ${{secrets.GH_USER}}
echo token: ${{secrets.GITHUB_TOKEN}}
git remote set-url origin https://${{secrets.GITHUB_TOKEN}}@github.com/decentralized-identity/agent-explorer.git
git config user.name $GH_USER
git config user.email $GH_EMAIL
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install
- run: pnpm run -r build:js
- run: pnpm run test