Skip to content

Commit

Permalink
Merge pull request #217 from ensdomains/reimplement-release-github-wo…
Browse files Browse the repository at this point in the history
…rkflow

Create release.yml
  • Loading branch information
storywithoutend authored Nov 4, 2024
2 parents 3629434 + 72dceb6 commit 0781da0
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 18 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release

on:
release:
types: [published]

jobs:
release:
name: Release
permissions:
id-token: write
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}

- uses: pnpm/action-setup@v4
with:
version: 9.4.0

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- run: pnpm install --frozen-lockfile

- name: Set up git
run: |
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
git config --local user.name 'github-actions[bot]'
- name: Bump version to ${{ github.event.release.tag_name }}
run: |
pnpm -F @ensdomains/ensjs ver ${{ github.event.release.tag_name }}
git add .
git commit -m "${{ github.event.release.tag_name }}"
- name: Publish
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: |
pnpm config set //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
pnpm -F @ensdomains/ensjs publish
- name: Push changes
run: git push
env:
github-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion packages/ensjs/src/functions/public/_getAbi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ it('propagates error when strict is true', async () => {
Params: (uint256, bytes)
Data: 0x1234 (2 bytes)
Version: [email protected]]
Version: 2.21.12]
`)
})
2 changes: 1 addition & 1 deletion packages/ensjs/src/functions/public/_getAddr.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ it('propagates error when strict is true', async () => {
Params: (address)
Data: 0x1234 (2 bytes)
Version: [email protected]]
Version: 2.21.12]
`)
})
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ it('propagates error when strict is true', async () => {
Params: (bytes)
Data: 0x1234 (2 bytes)
Version: [email protected]]
Version: 2.21.12]
`)
})
2 changes: 1 addition & 1 deletion packages/ensjs/src/functions/public/_getText.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ it('propagates error when strict is true', async () => {
Params: (string)
Data: 0x1234 (2 bytes)
Version: [email protected]]
Version: 2.21.12]
`)
})
2 changes: 1 addition & 1 deletion packages/ensjs/src/functions/public/getAbiRecord.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ describe('getAbiRecord()', () => {
function: resolve(bytes name, bytes data)
args: (0x, 0x)
Version: [email protected]]
Version: 2.21.12]
`)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('getAddressRecord()', () => {
function: resolve(bytes name, bytes data)
args: (0x, 0x)
Version: [email protected]]
Version: 2.21.12]
`)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('getContentHashRecord', () => {
function: resolve(bytes name, bytes data)
args: (0x, 0x)
Version: [email protected]]
Version: 2.21.12]
`)
})
})
2 changes: 1 addition & 1 deletion packages/ensjs/src/functions/public/getName.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('getName', () => {
function: reverse(bytes reverseName)
args: (0x)
Version: [email protected]]
Version: 2.21.12]
`)
})
it('should not return unnormalised name', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ensjs/src/functions/public/getRecords.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe('getRecords()', () => {
args: (0x04746573740365746800, ["0x5678"])
Docs: https://viem.sh/docs/contract/decodeErrorResult
Version: [email protected]]
Version: 2.21.12]
`)
})
})
2 changes: 1 addition & 1 deletion packages/ensjs/src/functions/public/getTextRecord.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('getTextRecord()', () => {
function: resolve(bytes name, bytes data)
args: (0x, 0x)
Version: [email protected]]
Version: 2.21.12]
`)
})
})
8 changes: 4 additions & 4 deletions packages/ensjs/src/functions/public/universalWrapper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ it('throws on result decode error when strict is true', async () => {
Params: (bytes data, address resolver)
Data: 0x1234 (2 bytes)
Version: [email protected]]
Version: 2.21.12]
`)
})

Expand Down Expand Up @@ -116,7 +116,7 @@ it('throws on known contract error when strict is true', async () => {
function: resolve(bytes name, bytes data)
args: (0x, 0x)
Version: [email protected]]
Version: 2.21.12]
`)
})

Expand Down Expand Up @@ -147,7 +147,7 @@ it('throws on unknown contract error when strict is false', async () => {
args: (0x, 0x)
Docs: https://viem.sh/docs/contract/decodeErrorResult
Version: [email protected]]
Version: 2.21.12]
`)
})

Expand Down Expand Up @@ -178,6 +178,6 @@ it('throws on unknown contract error when strict is true', async () => {
args: (0x, 0x)
Docs: https://viem.sh/docs/contract/decodeErrorResult
Version: [email protected]]
Version: 2.21.12]
`)
})
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('checkSafeUniversalResolverData', () => {
function: resolve(bytes name, bytes data)
args: (0x, 0x)
Version: [email protected]]
Version: 2.21.12]
`)
})

Expand Down Expand Up @@ -97,7 +97,7 @@ describe('checkSafeUniversalResolverData', () => {
function: resolve(bytes name, bytes data)
args: (ab, cd)
Version: [email protected]]
Version: 2.21.12]
`)
})

Expand Down Expand Up @@ -129,7 +129,7 @@ describe('checkSafeUniversalResolverData', () => {
args: (0x, 0x)
Docs: https://viem.sh/docs/contract/decodeErrorResult
Version: [email protected]]
Version: 2.21.12]
`)
})

Expand Down Expand Up @@ -161,7 +161,7 @@ describe('checkSafeUniversalResolverData', () => {
args: (0x, 0x)
Docs: https://viem.sh/docs/contract/decodeErrorResult
Version: [email protected]]
Version: 2.21.12]
`)
})
})

0 comments on commit 0781da0

Please sign in to comment.