Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] set up release workflow #33

Merged
merged 2 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/metal-goats-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"op-wagmi": patch
---

setup release
30 changes: 0 additions & 30 deletions .github/workflows/publish.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Version 🔖

on:
push:
branches:
- master

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
version:
name: Release
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: "Setup"
uses: ./.github/actions/setup

- name: Build
shell: bash
run: pnpm build

- name: Set deployment token
run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"

# https://github.com/changesets/action#with-publishing
- name: Handle Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
title: "chore: version packages 🔖"
commit: "chore: version packages 🔖"
publish: pnpm release:publish
version: pnpm release:version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"typedoc-plugin-markdown": "^3.17.0",
"typescript": "5.0.4",
"vitest": "^0.34.1",
"wagmi": "beta",
"@testing-library/react-hooks": "^8.0.1",
"@tanstack/react-query": ">=5.0.0"
},
"scripts": {
Expand All @@ -69,7 +69,7 @@
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir ./dist/esm && echo > ./dist/esm/package.json '{\"type\":\"module\",\"sideEffects\":false}'",
"build:types": "tsc --project tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
"generate:docs": "pnpm run typedoc",
"release:check": "changeset status --verbose --since=origin/main",
"release:check": "changeset status --verbose --since=origin/master",
"release:publish": "pnpm install && pnpm build && changeset publish",
"release:version": "changeset version && pnpm install --lockfile-only",
"clean": "rimraf dist",
Expand All @@ -91,8 +91,7 @@
"prepare": "npx simple-git-hooks"
},
"dependencies": {
"@eth-optimism/contracts-ts": "^0.15.0",
"@testing-library/react-hooks": "^8.0.1"
"@eth-optimism/contracts-ts": "^0.15.0"
},
"peerDependencies": {
"@tanstack/react-query": ">=5.0.0",
Expand Down
Loading