Skip to content

Commit

Permalink
Merge pull request #3 from Uniswap/feat/npm-publish
Browse files Browse the repository at this point in the history
add npm publishing to script
  • Loading branch information
gretzke authored Jul 31, 2024
2 parents 697e648 + b22917f commit 428f426
Show file tree
Hide file tree
Showing 94 changed files with 61 additions and 4,503 deletions.
44 changes: 43 additions & 1 deletion .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ on:

jobs:
create-release:
runs-on: ubuntu-latest
runs-on:
group: npm-deploy
environment:
name: release
steps:
Expand Down Expand Up @@ -37,6 +38,26 @@ jobs:
env:
LATEST_TAG: ${{ steps.get_latest_tag.outputs.LATEST_TAG }}

- name: Update package.json version
run: |
new_version=${{ steps.increment_version.outputs.NEW_VERSION }}
jq --arg new_version "${new_version#v}" '.version = $new_version' package.json > package.json.tmp && mv package.json.tmp package.json
env:
NEW_VERSION: ${{ steps.increment_version.outputs.NEW_VERSION }}

- name: Setup SSH
uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}

- name: Commit updated package.json
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add package.json
git commit -m "Release ${{ steps.increment_version.outputs.NEW_VERSION }}"
git push
- name: Generate changelog
id: generate_changelog
run: |
Expand Down Expand Up @@ -111,3 +132,24 @@ jobs:
${{ steps.generate_changelog.outputs.CHANGELOG }}
draft: false
prerelease: false

- name: Load npm secret
uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0
with:
# Export loaded secrets as environment variables
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
# You may need to change this to your vault name and secret name
# Refer to it by calling env.NPM_TOKEN
# This token is also limited by IP to ONLY work on the runner
NPM_TOKEN: op://npm-deploy/npm-runner-token/secret

- name: Publish package to npm
uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@uniswap/interfaces",
"version": "0.0.0",
"description": "Smart contract interfaces of Uniswap protocol smart contracts",
"repository": {
"type": "git",
"url": "git+https://github.com/Uniswap/interfaces.git"
},
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/Uniswap/interfaces/issues"
},
"homepage": "https://github.com/Uniswap/interfaces#readme",
"publishConfig": {
"access": "public"
}
}

This file was deleted.

78 changes: 0 additions & 78 deletions src/lib-external/oz-v3.4-solc-0.7/contracts/token/ERC20/IERC20.sol

This file was deleted.

129 changes: 0 additions & 129 deletions src/lib-external/oz-v3.4-solc-0.7/contracts/token/ERC721/IERC721.sol

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 428f426

Please sign in to comment.