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

Add Changesets and remove semantic releases #556

Merged
merged 2 commits into from
Dec 5, 2024
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": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
29 changes: 29 additions & 0 deletions .github/workflows/betaRelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Beta Release
on:
push:
branches:
- beta
workflow_dispatch:
inputs:
branch:
description: 'Branch name'
required: true
default: 'beta'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
36 changes: 24 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,42 @@
name: Release

on:
push:
branches:
- main
- beta
workflow_dispatch:
inputs:
branch:
description: 'Branch name'
required: true
default: 'main'

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

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
- name: Update npm to latest
run: npm install -g npm@latest
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Release
- name: Publish
uses: changesets/action@v1
with:
title: "release: version packages"
commit: "release: version packages"
publish: yarn publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xmtp/react-native-sdk",
"version": "0.1.0",
"version": "3.1.1",
"description": "Wraps for native xmtp sdks for react native",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand All @@ -10,6 +10,7 @@
"lint": "expo-module lint",
"test": "expo-module test",
"prepare": "expo-module prepare",
"publish": "expo-module build && changeset publish",
"prepublishOnly": "expo-module prepublishOnly",
"pretty": "npx prettier '**/*.{js,ts,tsx}' --write",
"expo-module": "expo-module",
Expand Down Expand Up @@ -39,12 +40,14 @@
]
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"author": "XMTP Labs <[email protected]>",
"license": "MIT",
"homepage": "https://github.com/xmtp/xmtp-react-native#readme",
"dependencies": {
"@changesets/cli": "^2.27.10",
"@ethersproject/bytes": "^5.7.0",
"@msgpack/msgpack": "^3.0.0-beta2",
"@noble/hashes": "^1.3.3",
Expand Down
Loading
Loading