-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
191 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": [ | ||
"@changesets/changelog-github", | ||
{ "repo": "urigo/graphql-modules" } | ||
], | ||
"commit": false, | ||
"linked": [], | ||
"access": "restricted", | ||
"access": "public", | ||
"baseBranch": "master", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [ | ||
|
@@ -12,5 +15,9 @@ | |
"examples-di", | ||
"examples-subscriptions", | ||
"graphql-yoga" | ||
] | ||
], | ||
"snapshot": { | ||
"useCalculatedVersion": true, | ||
"prereleaseTemplate": "{tag}-{datetime}-{commit}" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,72 +4,34 @@ on: | |
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- ".changeset/**/*.md" | ||
|
||
jobs: | ||
publish-canary: | ||
name: Publish Canary | ||
canary: | ||
runs-on: ubuntu-latest | ||
if: contains(github.actor, 'dependabot') == false | ||
if: github.event.pull_request.head.repo.full_name == github.repository || github.event.inputs.onDemand == 'yes' | ||
steps: | ||
- name: Checkout Master | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Use Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
- name: Configure Git Credentials | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "theguild-bot" | ||
echo "machine github.com login theguild-bot password ${{secrets.GH_API_TOKEN}}" > ~/.netrc | ||
- name: Setup NPM credentials | ||
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | ||
- uses: actions/cache@v2 | ||
name: Cache node_modules | ||
uses: actions/setup-node@v3 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-yarn-18-16-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn-18-16 | ||
${{ runner.os }}-yarn-18- | ||
${{ runner.os }}-yarn- | ||
node-version: 16 | ||
cache: "yarn" | ||
|
||
- name: Install Dependencies using Yarn | ||
run: yarn install --ignore-engines && git checkout yarn.lock | ||
run: yarn | ||
|
||
- name: Release Canary | ||
id: canary | ||
uses: 'kamilkisiela/release-canary@master' | ||
if: github.repository == 'urigo/graphql-modules' | ||
with: | ||
npm-token: ${{ secrets.NODE_AUTH_TOKEN }} | ||
npm-script: 'yarn release:canary' | ||
changesets: true | ||
- name: Publish a message | ||
if: steps.canary.outputs.released | ||
uses: 'kamilkisiela/pr-comment@master' | ||
uses: "the-guild-org/changesets-snapshot-action@main" | ||
with: | ||
message: | | ||
The latest changes of this PR are available as alpha in npm (based on the declared `changesets`): | ||
``` | ||
${{ steps.canary.outputs.changesetsPublishedPackages}} | ||
``` | ||
bot-token: ${{ secrets.GH_API_TOKEN }} | ||
bot: 'theguild-bot' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Publish a empty message | ||
if: steps.canary.outputs.released == 'false' | ||
uses: 'kamilkisiela/pr-comment@master' | ||
with: | ||
message: | | ||
The latest changes of this PR are not available as alpha, since there are no linked `changesets` for this PR. | ||
$ yarn pr | ||
Describe changes introduced in this Pull Request by running the above command. | ||
bot-token: ${{ secrets.GH_API_TOKEN }} | ||
bot: 'theguild-bot' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: alpha | ||
prepareScript: "yarn build" | ||
env: | ||
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Dependencies Changeset | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
changeset: | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Create/Update Changesets | ||
uses: "the-guild-org/changesets-dependencies-action@main" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,48 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
release: | ||
name: stable | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Master | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Configure Git Credentials | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "theguild-bot" | ||
echo "machine github.com login theguild-bot password ${{secrets.GH_API_TOKEN}}" > ~/.netrc | ||
- name: Add origin remote and refetch master | ||
run: | | ||
git remote rm origin | ||
git remote add origin "https://github.com/${{github.repository}}" | ||
git fetch | ||
git checkout master | ||
git reset --hard | ||
|
||
- name: Use Node | ||
uses: actions/setup-node@v2 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Setup NPM credentials | ||
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | ||
- uses: actions/cache@v2 | ||
name: Cache node_modules | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-yarn-18-16-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn-18-16- | ||
${{ runner.os }}-yarn-18- | ||
${{ runner.os }}-yarn- | ||
node-version: 16 | ||
cache: "yarn" | ||
|
||
- name: Install Dependencies using Yarn | ||
run: yarn install --ignore-engines && git checkout yarn.lock | ||
run: yarn | ||
|
||
- name: Build Packages | ||
run: yarn build | ||
|
||
- name: set version variables | ||
id: vars | ||
shell: bash | ||
run: | | ||
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | ||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@master | ||
uses: dotansimha/changesets-action@v1.3.1 | ||
with: | ||
publish: yarn release | ||
commit: 'chore(release): update monorepo packages versions' | ||
title: 'Upcoming Release Changes' | ||
commit: "chore(release): update monorepo packages versions" | ||
title: "Upcoming Release Changes" | ||
createGithubReleases: aggregate | ||
githubReleaseName: "Release ${{ steps.vars.outputs.sha_short }} (from ${{ steps.vars.outputs.branch }})" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
e7f19f2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
graphql-modules – ./
graphql-modules.vercel.app
www.graphql-modules.com
graphql-modules.com
graphql-modules-theguild.vercel.app
graphql-modules-git-master-theguild.vercel.app