Skip to content

Commit

Permalink
chore: automated release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zzmp committed May 5, 2022
1 parent e76a4a4 commit e6c0236
Show file tree
Hide file tree
Showing 6 changed files with 2,378 additions and 74 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/publish.yaml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
workflow_dispatch: # manually

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/setup

- run: yarn lint

- run: yarn test
if: success()

- run: yarn build
if: success()

- run: yarn release
if: success()
env:
NPM_CONFIG_USERCONFIG: /dev/null
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
15 changes: 15 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"branches": "main",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"@semantic-release/github",
"@semantic-release/npm"
]
}
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ If code is in the critical path, will be frequently visited, or makes large arch
- Verify that all CI checks pass before merging
- Have at least one product manager or designer approve of any significant UX changes

Additionally, git commit messages should follow [Conventional Commits](https://conventionalcommits.org), which is used to standardize the release process.

## Guidelines

The following points should help guide your development:
Expand All @@ -58,7 +60,7 @@ The following points should help guide your development:

## Publishing

Releases are manually triggered on [GitHub](https://github.com/Uniswap/uniswap-interface/actions/workflows/publish.yaml).
Releases are manually triggered [through the release workflow](https://github.com/Uniswap/uniswap-interface/actions/workflows/release.yaml).

In general, fixes and features should be created on a new branch from `main`.
Use the automatic Vercel preview for the branch to collect feedback.
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "@uniswap/widgets",
"version": "1.0.7",
"description": "Uniswap Interface",
"homepage": "https://github.com/Uniswap/widgets",
"homepage": "https://github.com/Uniswap/widgets#readme",
"repository": "https://github.com/Uniswap/widgets",
"files": [
"dist"
],
Expand Down Expand Up @@ -37,6 +38,7 @@
"prepublishOnly": "tsc && yarn build",
"start": "cosmos",
"build": "rollup --config --failAfterWarnings",
"release": "semantic-release",
"lint": "eslint .",
"test": "jest"
},
Expand Down Expand Up @@ -122,6 +124,8 @@
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-replace": "^3.0.1",
"@rollup/plugin-url": "^6.1.0",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@svgr/rollup": "^6.2.1",
"@typechain/ethers-v5": "^7.0.0",
"@types/jest": "^25.2.1",
Expand Down Expand Up @@ -183,6 +187,7 @@
"rollup-plugin-node-externals": "^3.1.2",
"rollup-plugin-scss": "^3.0.0",
"sass": "^1.45.1",
"semantic-release": "^19.0.2",
"typechain": "^5.0.0",
"typescript": "^4.4.3",
"wcag-contrast": "^3.0.0",
Expand Down
Loading

1 comment on commit e6c0236

@vercel
Copy link

@vercel vercel bot commented on e6c0236 May 5, 2022

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:

widgets – ./

widgets-uniswap.vercel.app
widgets-seven-tau.vercel.app
widgets-git-main-uniswap.vercel.app

Please sign in to comment.