Skip to content

Commit

Permalink
Added publishing to github npm registry
Browse files Browse the repository at this point in the history
  • Loading branch information
dm3ch committed Jul 28, 2023
1 parent aea9685 commit 8371a74
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish package

on:
push:
tags:
- v*.*.*

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
scope: ${{ github.repository_owner }}

- name: Update package.json
run: |
TAG_NAME=${GITHUB_REF/refs\/tags\//}
PACKAGE_VERSION=${TAG_NAME#v}
echo "Updating package.json to version $PACKAGE_VERSION"
cat <<< $(jq -r ".version=\"$PACKAGE_VERSION\"" package.json) > package.json
cat <<< $(jq -r ".name=\"@${{ github.repository }}\"" package.json) > package.json
cat package.json
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Publish
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1inch/permit-signed-approvals-utils",
"version": "1.4.8",
"version": "1.4.9",
"description": "Utils library for EIP-2612: permit – 712-signed approvals",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 8371a74

Please sign in to comment.