Skip to content

Commit a2fb0c4

Browse files
committed
wip
1 parent a1547c5 commit a2fb0c4

File tree

7 files changed

+52
-142
lines changed

7 files changed

+52
-142
lines changed

.changeset/config.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"$schema": "https://unpkg.com/@changesets/config@1.7.0/schema.json",
3-
"changelog": "@changesets/cli/changelog",
2+
"$schema": "https://unpkg.com/@changesets/config@2.1.0/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "graphprotocol/graph-client" }],
44
"commit": false,
55
"linked": [],
66
"ignore": [
@@ -18,5 +18,10 @@
1818
"cross-chain-extension"
1919
],
2020
"access": "public",
21-
"baseBranch": "main"
21+
"baseBranch": "main",
22+
"updateInternalDependencies": "patch",
23+
"snapshot": {
24+
"useCalculatedVersion": true,
25+
"prereleaseTemplate": "{tag}-{datetime}-{commit}"
26+
}
2227
}

.github/workflows/canary.yml

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
name: Canary Release
1+
name: release
22

33
on:
44
pull_request:
55
paths:
66
- '.changeset/**/*.md'
77

88
jobs:
9-
publish-canary:
10-
name: Publish Canary
9+
canary:
10+
name: canary
1111
runs-on: ubuntu-latest
1212
if: github.event.pull_request.head.repo.full_name == github.repository
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v3
1616
with:
1717
fetch-depth: 0
18+
1819
- name: Use Node
1920
uses: actions/setup-node@v3
2021
with:
@@ -24,11 +25,6 @@ jobs:
2425
- name: Install Dependencies using Yarn
2526
run: yarn
2627

27-
- name: Setup NPM credentials
28-
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
29-
env:
30-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
31-
3228
- name: Release Canary
3329
id: canary
3430
uses: 'kamilkisiela/release-canary@master'
@@ -40,28 +36,12 @@ jobs:
4036
npm-script: 'yarn release:canary'
4137
changesets: true
4238

43-
- name: Publish a message
44-
if: steps.canary.outputs.released == 'true'
45-
uses: 'kamilkisiela/pr-comment@master'
46-
with:
47-
commentKey: canary
48-
message: |
49-
The latest changes of this PR are available as canary in npm (based on the declared `changesets`):
50-
51-
```
52-
${{ steps.canary.outputs.changesetsPublishedPackages}}
53-
```
54-
bot-token: ${{ secrets.GITHUB_TOKEN }}
55-
bot: 'github-actions[bot]'
56-
github-token: ${{ secrets.GITHUB_TOKEN }}
57-
58-
- name: Publish a empty message
59-
if: steps.canary.outputs.released == 'false'
60-
uses: 'kamilkisiela/pr-comment@master'
39+
- name: Release Canary
40+
id: canary
41+
uses: 'the-guild-org/changesets-snapshot-action@main'
6142
with:
62-
commentKey: canary
63-
message: |
64-
The latest changes of this PR are not available as canary, since there are no linked `changesets` for this PR.
65-
bot-token: ${{ secrets.GITHUB_TOKEN }}
66-
bot: 'github-actions[bot]'
67-
github-token: ${{ secrets.GITHUB_TOKEN }}
43+
tag: alpha
44+
prepareScript: 'yarn build'
45+
env:
46+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: dependencies
2+
on: pull_request
3+
jobs:
4+
changeset:
5+
if: github.event.pull_request.head.repo.full_name == github.repository
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v3
10+
with:
11+
fetch-depth: 0
12+
13+
- name: Create/Update Changesets
14+
uses: 'the-guild-org/changesets-dependencies-action@main'
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: release
22

33
on:
44
push:
@@ -7,39 +7,42 @@ on:
77

88
jobs:
99
release:
10-
name: Release
10+
name: stable
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout Repo
14-
uses: actions/checkout@master
13+
- name: Checkout
14+
uses: actions/checkout@v3
1515
with:
16-
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
1716
fetch-depth: 0
1817

1918
- name: Use Node
20-
uses: actions/setup-node@master
19+
uses: actions/setup-node@v3
2120
with:
22-
node-version: 16.x
21+
node-version: 18
2322
cache: 'yarn'
2423

25-
- name: Setup NPM credentials
26-
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
27-
env:
28-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
29-
3024
- name: Install Dependencies using Yarn
3125
run: yarn
3226

3327
- name: Build Packages
3428
run: yarn build
3529

30+
- name: set version variables
31+
id: vars
32+
shell: bash
33+
run: |
34+
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
35+
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
36+
3637
- name: Create Release Pull Request or Publish to npm
3738
id: changesets
3839
uses: changesets/action@master
3940
with:
4041
publish: yarn release
4142
commit: 'chore(release): update monorepo packages versions'
4243
title: 'Upcoming Release Changes'
44+
createGithubReleases: aggregate
45+
githubReleaseName: 'Release ${{ steps.vars.outputs.sha_short }} (from ${{ steps.vars.outputs.branch }})'
4346
env:
4447
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4548
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"build": "bob build",
1111
"test": "jest --passWithNoTests --detectLeaks --detectOpenHandles",
1212
"release": "yarn build && changeset publish",
13-
"release:canary": "(node scripts/canary-release.js && yarn build && yarn changeset publish --tag canary) || echo Skipping Canary...",
1413
"fix-bin": "node scripts/fix-bin.js",
1514
"postbuild": "yarn fix-bin"
1615
},

renovate.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
11
{
2-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": [
4-
"github>the-guild-org/shared-config:renovate",
5-
":preserveSemverRanges"
6-
],
7-
"packageRules": [
8-
{
9-
"groupName": "envelop",
10-
"matchPackagePrefixes": "@envelop"
11-
}
12-
]
2+
"extends": ["github>the-guild-org/shared-config:renovate"]
133
}

scripts/canary-release.js

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)