Skip to content

Commit

Permalink
publish: github action activated
Browse files Browse the repository at this point in the history
  • Loading branch information
formysister committed Mar 14, 2024
1 parent 7d4ce0a commit 2fcd782
Show file tree
Hide file tree
Showing 10 changed files with 196 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@uniswap/web-reviewers
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Bug Report
about: Describe the issue
title: ''
labels: bug
assignees: ''
---

**Bug Description**
A clear and concise description of the bug.

**Steps to Reproduce**

1. Go to ...
2. Click on ...
...

**Expected Behavior**
A clear and concise description of what you expected to happen.

**Additional Context**
Add any other context about the problem here (screenshots, whether the bug only occurs only in certain mobile/desktop/browser environments, etc.)
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Support
url: https://discord.gg/FCfyBSbCU5
about: Please ask and answer questions here
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature Request
about: Suggest an idea for improving the UX
title: ''
labels: 'improvement'
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
21 changes: 21 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Setup
runs:
using: composite
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
cache: yarn

- uses: actions/cache@v3
id: install-cache
with:
path: node_modules/
key: ${{ runner.os }}-install-${{ hashFiles('**/yarn.lock') }}

- if: steps.install-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --ignore-scripts
shell: bash
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: npm
# Files stored in repository root
directory: '/'
schedule:
interval: 'daily'
allow:
- dependency-name: '@uniswap/token-lists'
- dependency-name: '@uniswap/default-token-list'
- dependency-name: '@uniswap/redux-multicall'
# reviewers:
# - 'Uniswap/dependabot-reviewers'
16 changes: 16 additions & 0 deletions .github/workflows/conventional-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Conventional commit

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
check-pr-title:
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release

on:
push:
branches:
- main
# manual trigger
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn prepare

- run: yarn prei18n:compile
# - uses: crowdin/[email protected]
# with:
# upload_sources: true
# download_translations: true
# create_pull_request: false
# push_translations: false
# localization_branch_name: main
# source: 'src/locales/en-US.po'
# translation: 'src/locales/%locale%.po'
# crowdin_branch_name: widgets
# token: ${{ secrets.CROWDIN_TOKEN }}
# project_id: 458284
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: yarn i18n:compile

- run: yarn test
if: success()
env:
JSON_RPC_PROVIDER: ${{ secrets.JSON_RPC_PROVIDER }}

- run: yarn release
if: success()
env:
NPM_CONFIG_USERCONFIG: /dev/null
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
49 changes: 49 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test

on:
pull_request:
branches:
- main
# manual trigger
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn prepare

- run: yarn lint

deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn yarn-deduplicate --strategy=highest --list --fail

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn prepare

- run: yarn test
env:
JSON_RPC_PROVIDER: ${{ secrets.JSON_RPC_PROVIDER }}

- run: yarn test:e2e
env:
JSON_RPC_PROVIDER: ${{ secrets.JSON_RPC_PROVIDER }}

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn prepare

- run: yarn build
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@uniswap/widgets",
"description": "Uniswap Interface",
"homepage": "https://github.com/Uniswap/widgets#readme",
"repository": "https://github.com/Uniswap/widgets",
"name": "uniswap-widget",
"description": "Uniswap Interface Extension Version",
"homepage": "https://github.com/formysister/uniswap-widget#readme",
"repository": "https://github.com/formysister/uniswap-widget",
"files": [
"dist"
],
Expand Down

0 comments on commit 2fcd782

Please sign in to comment.