Skip to content

Commit d9a639c

Browse files
authored
Set up release PR's (#992)
* Set up release PR's * Add @changesets/changelog-github so the changelog entries include PR links * Add missing changelog entry, it was missing because of the GH access bug
1 parent fddccb4 commit d9a639c

File tree

7 files changed

+64
-69
lines changed

7 files changed

+64
-69
lines changed

.changeset/config.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3-
"changelog": "@changesets/cli/changelog",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{ "repo": "cloudfour/cloudfour.com-patterns" }
6+
],
47
"commit": false,
58
"linked": [],
69
"access": "public",

.changeset/green-grapes-unite.md

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

.github/workflows/changesets.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
name: Changesets
1+
name: Release
22

33
on:
44
push:
55
branches:
66
- v-next
77

88
jobs:
9-
changesets:
9+
release:
10+
name: Release
1011
runs-on: ubuntu-latest
1112
steps:
12-
- uses: actions/checkout@v2
13+
- name: Checkout Repo
14+
uses: actions/checkout@v2
1315
with:
14-
# Fetch all Git history so that Changesets can generate changelogs with the correct commits
16+
# Fetch all git history for correct changelog commits
1517
fetch-depth: 0
16-
# Don't set the GITHUB_TOKEN variable
17-
persist-credentials: false
1818
- name: Use Node.js 12
1919
uses: actions/setup-node@v1
2020
with:
@@ -25,17 +25,13 @@ jobs:
2525
run: npm run preprocess
2626
- name: Run Build
2727
run: npm run build
28-
- name: Bump version + changelog (creates commit + tag)
29-
run: ./version-from-changesets.sh
30-
- name: Set npm token
31-
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
28+
- name: Create Release Pull Request or Publish to npm
29+
uses: changesets/action@master
30+
with:
31+
publish: npm run release
32+
version: npm run version
33+
title: 'Publish Next Version'
34+
commit: 'Publish Next Version'
3235
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3337
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
34-
- name: Publish to npm + create git tag
35-
run: npx changeset publish
36-
- name: Push release commit + tag
37-
uses: ad-m/[email protected]
38-
with:
39-
github_token: ${{ secrets.GITHUB_TOKEN }}
40-
tags: true
41-
branch: v-next

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @cloudfour/patterns
22

3+
## 0.3.1
4+
5+
### Patch Changes
6+
7+
- [`97da320`](https://github.com/cloudfour/cloudfour.com-patterns/commit/97da320ee80d2f004dca264f2969cb13fe6e87a7) [#989](https://github.com/cloudfour/cloudfour.com-patterns/pull/989) Thanks [@tylersticka](https://github.com/tylersticka)! - Fix for missing SVGs in compiled CSS
8+
39
## 0.3.0
410

511
### Minor Changes

package-lock.json

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cloudfour/patterns",
3-
"version": "0.2.0",
3+
"version": "0.3.1",
44
"author": "Cloud Four",
55
"description": "Front-end patterns for cloudfour.com",
66
"homepage": "https://github.com/cloudfour/cloudfour.com-patterns",
@@ -45,6 +45,7 @@
4545
"devDependencies": {
4646
"@babel/core": "7.12.3",
4747
"@babel/preset-env": "7.12.1",
48+
"@changesets/changelog-github": "0.2.7",
4849
"@changesets/cli": "2.11.1",
4950
"@cloudfour/eslint-plugin": "14.0.0",
5051
"@cypress/webpack-preprocessor": "5.4.8",
@@ -133,6 +134,8 @@
133134
"lint:css": "stylelint --fix '**/*.scss'",
134135
"lint:js": "eslint . --fix",
135136
"test": "cypress run",
136-
"test:open": "cypress open"
137+
"test:open": "cypress open",
138+
"version": "changeset version && prettier --write .",
139+
"release": "npm run build && changeset publish"
137140
}
138141
}

version-from-changesets.sh

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

0 commit comments

Comments
 (0)