-
Notifications
You must be signed in to change notification settings - Fork 827
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
Setting up a changesets based release workflow #681
Changes from all commits
d2c0342
1c7ba01
8719911
d67b0b9
54ce41e
d0a1c48
533e78e
fae0616
16d70b5
9056681
8d7aa84
d2fdfc4
aba86d0
ca299ba
02996b7
24abd8b
c25611e
3fa1b5e
dec7de1
1c4caf4
7c7a21d
75865ac
93764f6
08cb24b
ec692a3
8facd8b
81c358d
c394d9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@1.6.1/schema.json", | ||
"changelog": ["@changesets/changelog-github", {"repo": "primer/octicons"}], | ||
"commit": false, | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/octicons': patch | ||
--- | ||
|
||
Adding changesets workflow to octicons for releasing. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'next_major' | ||
jobs: | ||
release: | ||
name: Final | ||
if: ${{ github.repository == 'primer/octicons' }} | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Setup Ruby | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.0.x | ||
|
||
- name: Install dependencies | ||
run: | | ||
yarn | ||
bundle install | ||
- name: Create release pull request or publish to npm | ||
id: changesets | ||
uses: changesets/action@master | ||
with: | ||
title: Release Tracking | ||
version: yarn changeset:version | ||
# This is a hack to make the changeset action think we npm published, so that it creates the github release | ||
publish: echo "New tag:" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GPR_AUTH_TOKEN_SHARED }} | ||
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_SHARED }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
.env | ||
node_modules | ||
vendor | ||
Gemfile.lock | ||
|
||
# Ignore build/export artifacts | ||
lib/**/build/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
source "https://rubygems.org" | ||
|
||
group :development, :test do | ||
gem "minitest" | ||
gem "rake" | ||
gem "rubocop", "0.59" | ||
gem "rubocop-github", "0.12.0" | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not too familiar with how Gemfiles work. What does this do? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a bit like package.json, I needed to pull these dev dependencies up to the root so I could run |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
{ | ||
"private": true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather keep this private, but changesets will skip if they find private true here, so I'm trying to avoid publishing main package.json file by adding + "publishConfig": {
+ "registry": "http://localhost:4873"
+ }, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where does that port number come from? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was wanting to point to anything other than npm and co-pilot suggested this 😆 The point is to fail it out so people don't I'll accept whatever you think here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, should we just say like Using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
"name": "@primer/octicons", | ||
"version": "16.1.0", | ||
"publishConfig": { | ||
"registry": "no registry, don't publish from this package.json." | ||
}, | ||
"scripts": { | ||
"version": "script/version", | ||
"changeset:version": "changeset version && script/version", | ||
"test": "ava -v tests/*.js", | ||
"lint": "eslint tests", | ||
"build": "script/build.js --input icons/**/*.svg --output lib/build/data.json", | ||
"start": "cd docs && npm run develop", | ||
"svgo": "svgo icons --config .svgo.yml" | ||
}, | ||
"dependencies": { | ||
"@changesets/changelog-github": "0.4.1", | ||
"@changesets/cli": "2.17.0", | ||
"@github/prettier-config": "0.0.4", | ||
"ava": "2.1.0", | ||
"braces": "2.3.1", | ||
"cheerio": "1.0.0-rc.3", | ||
"eslint": "7.24.0", | ||
"eslint-plugin-github": "4.1.3", | ||
"eslint": "8.0.1", | ||
"eslint-plugin-github": "4.3.2", | ||
"eslint-plugin-prettier": "4.0.0", | ||
"execa": "4.0.0", | ||
"fs-extra": "7.0.1", | ||
"globby": "11.0.0", | ||
|
@@ -39,7 +46,8 @@ | |
"requireConfigFile": false | ||
}, | ||
"rules": { | ||
"github/no-then": 0 | ||
"github/no-then": 0, | ||
"eslint-comments/no-use": 0 | ||
} | ||
} | ||
} |
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.
Should we add a link to this document in here somewhere?
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.
Nice I didn't realize we had these docs 👍🏻