Semaphore passkey #212
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: build | |
on: | |
push: | |
branches: [main, tee-tls] | |
pull_request: | |
branches: [main, tee-tls] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current project | |
uses: actions/checkout@v3 | |
- name: Checkout tlsn-js | |
uses: actions/checkout@v3 | |
with: | |
repository: eternisai/tlsn-js | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: tlsn-js | |
ref: remote-attestation | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: | | |
~/.npm | |
./node_modules | |
./tlsn-js/node_modules | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Display directory structure | |
run: tree -L 2 && npm --version | |
- name: Install dependencies | |
run: | | |
cd ./tlsn-js && npm i && cd - | |
sed -i -e 's/\.\.\/tlsn-js/\.\/tlsn-js/g' package.json | |
npm i | |
- name: Build tlsn-js | |
run: cd ./tlsn-js && npm run build && cd - | |
- name: Build current project | |
run: npm run build | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-output | |
path: ./zip |