-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #194 from 1Hive/branch_v6.0.2
Branch v6.0.2
- Loading branch information
Showing
11 changed files
with
18,129 additions
and
2,731 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,50 @@ | ||
name: Tests | ||
on: [push, pull_request] | ||
on: [pull_request] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Unit Tests | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 12 | ||
node-version: 20 | ||
- run: npm install | ||
- run: npm test | ||
# pass branch name to test script | ||
- run: npm run test -- --commit ${{ github.sha }} | ||
|
||
create-tag: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
name: Create Tag | ||
if: startsWith(github.ref, 'refs/heads/branch_v') | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Read package.json | ||
id: read-package-json | ||
run: | | ||
VERSION=$(node -p "require('./package.json').version") | ||
echo "::set-output name=version::$VERSION" | ||
- name: Check if tag exists | ||
id: check-tag | ||
run: | | ||
if git rev-parse "refs/tags/v${{ steps.read-package-json.outputs.version }}" >/dev/null 2>&1; then | ||
echo "::set-output name=tag_exists::true" | ||
else | ||
echo "::set-output name=tag_exists::false" | ||
fi | ||
- name: Create tag | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
if [[ "${{ steps.check-tag.outputs.tag_exists }}" == "false" ]]; then | ||
git tag -a v${{ steps.read-package-json.outputs.version }} -m "Auto-generated tag" | ||
git push origin v${{ steps.read-package-json.outputs.version }} | ||
else | ||
echo "Tag already exists. Skipping tag creation." | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.idea/ | ||
node_modules | ||
build/ | ||
build/ | ||
.yarn |
Oops, something went wrong.
d7b9caf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
default-token-list – ./
default-token-list-eight.vercel.app
tokens.honeyswap.org
default-token-list-git-master-1hive.vercel.app
default-token-list-1hive.vercel.app