Skip to content

Update index.html (#134) #54

Update index.html (#134)

Update index.html (#134) #54

name: Test, Build and Publish
on:
workflow_dispatch:
push:
branches:
- 'main'
jobs:
build-test-publish:
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
GH_TOKEN: ${{secrets.GH_TOKEN}}
GH_USER: ${{secrets.GH_USER}}
GH_EMAIL: ${{secrets.GH_EMAIL}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- run: pnpm add -g pnpm
- run: pnpm install
- run: pnpm test
- run: pnpm build
- name: 'setup git coordinates'
run: |
git remote set-url origin https://veramolabs:[email protected]/veramolabs/agent-explorer.git
git config user.name $GH_USER
git config user.email $GH_EMAIL
- name: 'setup npm registry'
run: |
echo "registry=https://registry.npmjs.org/" > .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
npm whoami
- name: 'publish'
if: github.ref == 'refs/heads/main'
run: pnpm release
release-electron:
needs: build-test-publish
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
GH_TOKEN: ${{secrets.GH_TOKEN}}
GH_USER: ${{secrets.GH_USER}}
GH_EMAIL: ${{secrets.GH_EMAIL}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
ref: main
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- run: pnpm add -g pnpm
- run: pnpm install
- name: Build/release Electron app
uses: paneron/[email protected]
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.GH_TOKEN }}
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
build_script_name: build-electron
package_manager: pnpm