Skip to content

Commit

Permalink
Add changesets and automated release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpalmer committed Jan 22, 2021
1 parent cf42ab4 commit dc12433
Show file tree
Hide file tree
Showing 6 changed files with 1,188 additions and 16 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/master/docs/common-questions.md)
13 changes: 13 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.4.0/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "jaredpalmer/cypress-image-snapshot" }
],
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
9 changes: 0 additions & 9 deletions .github/main.workflow

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release
on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
if: github.repository == 'jaredpalmer/cypress-image-snapshot'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
version: 12.x

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1

- name: Create Release Pull Request or Publish to npm
uses: changesets/action@master
with:
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"build": "babel src --out-dir .",
"test": "jest",
"lint": "eslint src",
"prepublish": "npm run build"
"prepublish": "npm run build",
"changeset": "changeset",
"release": "changeset publish"
},
"dependencies": {
"chalk": "^2.4.1",
Expand All @@ -27,6 +29,8 @@
"term-img": "^4.0.0"
},
"devDependencies": {
"@changesets/changelog-github": "^0.2.8",
"@changesets/cli": "^2.13.1",
"babel-cli": "^6.26.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.7.0",
Expand Down
Loading

0 comments on commit dc12433

Please sign in to comment.