Skip to content

Commit

Permalink
feat: add base functional
Browse files Browse the repository at this point in the history
  • Loading branch information
DiRaiks committed Nov 1, 2024
1 parent 321269b commit a6a180a
Show file tree
Hide file tree
Showing 29 changed files with 10,218 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @lidofinance/lido-si
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
24 changes: 24 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### Description

<!-- Briefly note most valuable changes in what you did and why we need it, even if the task was described in detail in the task tracker. -->

<!--- If any section below doesn't make sense for your pull request, delete it please. -->

### Demo

<!-- If thee are visual changes add screenshots or record a [loom](https://www.loom.com/). -->

### Code review notes

<!-- Describe all uncertain decisions you made code-wise, e.g. readability vs performance. -->

### Testing notes

<!-- List all possible edge cases and how to test them. -->

### Checklist:

- [ ] Checked the changes locally.
- [ ] Created/updated unit tests.
- [ ] Created/updated README.md.

30 changes: 30 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check all
on:
pull_request:
jobs:
check-all:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"

- name: Install dependencies
run: yarn --immutable

- name: Check Lint
run: yarn lint

- name: Build
run: yarn build
- name: Check types
run: yarn types

- name: Tests
run: yarn test
57 changes: 57 additions & 0 deletions .github/workflows/publish-alpha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Publish Beta version to registry
on:
workflow_dispatch:

permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
id-token: write # to enable use of OIDC for npm provenance

jobs:
pre-publish:
if: github.ref == 'refs/heads/develop'
uses: ./.github/workflows/publish-dry-run.yml
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
publish:
needs: pre-publish
runs-on: ubuntu-latest
environment: development
# restricts job to develop branch
if: github.ref == 'refs/heads/develop'
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"

- name: Install dependencies
run: yarn --immutable

- name: Build
run: yarn build:packages

- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: yarn npm audit

- name: Authenticate in npm
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
echo "workspaces-update=false" >> .npmrc
echo "provenance=true" >> .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish Alpha
run: yarn multi-semantic-release
env:
NPM_CONFIG_PROVENANCE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
48 changes: 48 additions & 0 deletions .github/workflows/publish-dry-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish Dry Run
on:
workflow_dispatch:
workflow_call:
secrets:
NPM_TOKEN:
description: 'NPM token'
required: true

jobs:
publish-dry-run:
runs-on: ubuntu-latest
environment: pre-publish
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- name: Install dependencies
run: yarn --immutable

- name: Build
run: yarn build:packages

- name: Dry run Publish
run: |
yarn multi-semantic-release --dry-run --silent > /tmp/multi-semantic-release-output
grep -E '#|###|\*' /tmp/multi-semantic-release-output > dry_run_output.txt || [ $? -eq 1 ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Write results to summary
run: |
if [ -s dry_run_output.txt ]; then
echo "# Packages to be published:" >> $GITHUB_STEP_SUMMARY
cat dry_run_output.txt >> $GITHUB_STEP_SUMMARY
else
echo "Nothing will be published" >> $GITHUB_STEP_SUMMARY
fi
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# env
.env
.env.local
.env.production
.env.development

# dependencies
/node_modules
/.pnp
.pnp.js
.yalc
yalc.lock
tsconfig.tsbuildinfo

# production
/build
/dist
Loading

0 comments on commit a6a180a

Please sign in to comment.