Skip to content

Support BTC message signing with ledger accounts #704

Support BTC message signing with ledger accounts

Support BTC message signing with ledger accounts #704

Workflow file for this run

name: Build
on:
pull_request:
branches: [main, develop]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
always-auth: true
node-version: '16.x'
registry-url: https://npm.pkg.github.com
scope: '@secretkeylabs'
- name: Install dependencies
run: npm ci --legacy-peer-deps
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_REGISTRY_TOKEN }}
- name: Build
run: npm run build --if-present
# - name: Test
# run: npm test --passWithNoTests
- name: Save Filename
run: |
BRANCH_NAME=$(echo ${{ github.head_ref }} | sed 's/\//-/')
GIT_SHA_SHORT=$(git rev-parse --short ${{ github.sha }})
echo "FILENAME=xverse-extension.$BRANCH_NAME.$GIT_SHA_SHORT.zip" >> $GITHUB_ENV
- name: Create Archive
run: zip -r build.zip ./build
- name: Upload Archive
uses: actions/upload-artifact@v3
with:
name: ${{ env.FILENAME }}
path: build.zip
retention-days: 30
if-no-files-found: error
comment-on-pr:
needs: build
runs-on: ubuntu-latest
steps:
- name: Get Artifact URL
env:
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
WORKFLOW_ID: ${{ github.run_id }}
run: |
ARTIFACT_URL="https://github.com/$OWNER/$REPO/actions/runs/$WORKFLOW_ID"
echo "ARTIFACT_URL=$ARTIFACT_URL" >> $GITHUB_ENV
- name: Delete old bot comments
if: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_ID: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
run: |
curl \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/$REPO/issues/$PR_ID/comments \
| jq ".[] | select(.user.login==\"github-actions[bot]\") | .id" \
| xargs -I %q curl \
-L \
-X DELETE \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $GITHUB_TOKEN"\
https://api.github.com/repos/$REPO/issues/comments/%q
- name: Post test package PR comment
if: ${{ github.event_name == 'pull_request' }}
env:
VERSION: ${{ steps.published-version.outputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_URL: ${{ github.event.pull_request.comments_url }}
run: |
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $GITHUB_TOKEN" \
$GITHUB_URL \
-d "{\"body\":\"> Test with build here: ${{ env.ARTIFACT_URL }}\"}"