diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2c68432 --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +# Environment variables and sensitive configuration files +.env +.env.* +.env.local +.env.development +.env.test +.env.production +.env.staging + +# Private keys and credentials +*.key +*.pem +private-key* +*private-key* + +# Infura and blockchain configuration +infura.config* +*.secrets + +# Node modules and dependencies +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Build artifacts +dist/ +build/ +*.log + +# IDE and editor files +.vscode/ +.idea/ +*.swp +*.swo +*~ +.DS_Store diff --git a/actions/setup-node-from-nvmrc/README.md b/actions/setup-node-from-nvmrc/README.md new file mode 100644 index 0000000..90d529c --- /dev/null +++ b/actions/setup-node-from-nvmrc/README.md @@ -0,0 +1,28 @@ +# Setup Node.js from .nvmrc + +A reusable composite action that sets up Node.js using the version specified in an `.nvmrc` file. + +## Usage + +```yaml +steps: + - uses: actions/checkout@v2 + - name: Setup Node.js from .nvmrc + uses: ./actions/setup-node-from-nvmrc +``` + +## Requirements + +- The repository must have an `.nvmrc` file in the root directory +- The `.nvmrc` file should contain a valid Node.js version (e.g., `16.14.0`, `18.x`) + +## What it does + +1. Reads the Node.js version from the `.nvmrc` file +2. Sets up Node.js with the specified version using `actions/setup-node@v2` + +## Benefits + +- Centralizes Node.js version management in `.nvmrc` +- Eliminates duplicated setup code across workflows +- Uses modern GitHub Actions output syntax (`$GITHUB_OUTPUT`) diff --git a/actions/setup-node-from-nvmrc/action.yml b/actions/setup-node-from-nvmrc/action.yml new file mode 100644 index 0000000..610cf01 --- /dev/null +++ b/actions/setup-node-from-nvmrc/action.yml @@ -0,0 +1,13 @@ +name: 'Setup Node.js from .nvmrc' +description: 'Sets up Node.js using the version specified in .nvmrc file' +runs: + using: "composite" + steps: + - name: Get Node.js version + id: nvm + shell: bash + run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: ${{ steps.nvm.outputs.NODE_VERSION }} diff --git a/blockchain-address.json b/blockchain-address.json new file mode 100644 index 0000000..da3c68b --- /dev/null +++ b/blockchain-address.json @@ -0,0 +1,17 @@ +{ + "address": "1wiz18xYmhRX6xStj2b9t1rwWX4GKUgpv", + "chain_stats": { + "funded_txo_count": 11, + "funded_txo_sum": 15007688098, + "spent_txo_count": 5, + "spent_txo_sum": 15007599040, + "tx_count": 13 + }, + "mempool_stats": { + "funded_txo_count": 0, + "funded_txo_sum": 0, + "spent_txo_count": 0, + "spent_txo_sum": 0, + "tx_count": 0 + } +} diff --git a/workflow-templates/build-lint-test.yml b/workflow-templates/build-lint-test.yml index b4d113e..f25a7de 100644 --- a/workflow-templates/build-lint-test.yml +++ b/workflow-templates/build-lint-test.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - run: yarn --frozen-lockfile --ignore-scripts diff --git a/workflow-templates/create-release-pr.yml b/workflow-templates/create-release-pr.yml index c34ce9a..99bf1ad 100644 --- a/workflow-templates/create-release-pr.yml +++ b/workflow-templates/create-release-pr.yml @@ -29,12 +29,8 @@ jobs: # We check out the specified branch, which will be used as the base # branch for all git operations and the release PR. ref: ${{ github.event.inputs.base-branch }} - - name: Get Node.js version - id: nvm - run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) - - uses: actions/setup-node@v2 - with: - node-version: ${{ steps.nvm.outputs.NODE_VERSION }} + - name: Setup Node.js from .nvmrc + uses: ./actions/setup-node-from-nvmrc - uses: MetaMask/action-create-release-pr@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/workflow-templates/publish-release.yml b/workflow-templates/publish-release.yml index 06c5f43..8d300bb 100644 --- a/workflow-templates/publish-release.yml +++ b/workflow-templates/publish-release.yml @@ -14,12 +14,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Get Node.js version - id: nvm - run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) - - uses: actions/setup-node@v2 - with: - node-version: ${{ steps.nvm.outputs.NODE_VERSION }} + - name: Setup Node.js from .nvmrc + uses: ./actions/setup-node-from-nvmrc - uses: MetaMask/action-publish-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}