Skip to content

Commit

Permalink
chore: fork release using npmmirror registry
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jul 10, 2023
1 parent adf73ee commit fff6585
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 6 deletions.
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)
9 changes: 9 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://unpkg.com/@changesets/config/schema.json",
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "fork-release",
"updateInternalDependencies": "patch",
"ignore": []
}
30 changes: 30 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Rebase

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
rebase:
name: Rebase and Push
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: fork-release
token: ${{ secrets.GH_TOKEN }}

- name: Set Git Info
run: |
git config --global user.email admin@1stg.me
git config --global user.name JounQin
git remote add upstream https://github.com/Automattic/node-canvas.git
- name: Rebase and Push
run: |
git fetch upstream master:master
git rebase upstream/master
git push -f
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
push:
branches:
- fork-release

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install Dependencies
run: npm install

- name: Publish to npm
uses: changesets/action@v1
with:
publish: npx @changesets/cli publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Sync to cnpm
run: npx cnpm sync canvas-npmmirror
12 changes: 12 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# canvas-npmmirror

A fork of [`canvas`](https://github.com/Automattic/node-canvas) using [`npmmirror`](https://npmmirror.com) as registry

## Installation

```bash
$ npm install canvas@npm:canvas-npmmirror
```

---

# node-canvas

![Test](https://github.com/Automattic/node-canvas/workflows/Test/badge.svg)
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "canvas",
"description": "Canvas graphics API backed by Cairo",
"name": "canvas-npmmirror",
"description": "A fork of `canvas` using `npmmirror` as registry",
"version": "2.11.2",
"author": "TJ Holowaychuk <tj@learnboost.com>",
"main": "index.js",
"browser": "browser.js",
"contributors": [
"Nathan Rajlich <nathan@tootallnate.net>",
"Rod Vagg <r@va.gg>",
"Juriy Zaytsev <kangax@gmail.com>"
"Juriy Zaytsev <kangax@gmail.com>",
"JounQin (https://www.1stG.me) <admin@1stg.me>"
],
"keywords": [
"canvas",
Expand All @@ -20,8 +21,8 @@
"images",
"pdf"
],
"homepage": "https://github.com/Automattic/node-canvas",
"repository": "git://github.com/Automattic/node-canvas.git",
"homepage": "https://github.com/un-es/canvas-npmmirror",
"repository": "git+https://github.com/un-es/canvas-npmmirror.git",
"scripts": {
"prebenchmark": "node-gyp build",
"benchmark": "node benchmarks/run.js",
Expand All @@ -37,7 +38,7 @@
"binary": {
"module_name": "canvas",
"module_path": "build/Release",
"host": "https://github.com/Automattic/node-canvas/releases/download/",
"host": "https://registry.npmmirror.com/-/binary/canvas/",
"remote_path": "v{version}",
"package_name": "{module_name}-v{version}-{node_abi}-{platform}-{libc}-{arch}.tar.gz"
},
Expand Down

0 comments on commit fff6585

Please sign in to comment.