Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
CI action for publishing the next version automatically (#8)
Browse files Browse the repository at this point in the history
* CI action for publishing the next version automatically

* remove output to file
  • Loading branch information
frehner committed Oct 17, 2022
1 parent a3bda06 commit a36e228
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Install the packages
run: yarn install --frozen-lockfile --ignore-engines

- name: Create Release Pull Request or Publish (for latest release)
- name: (latest) Create Release Pull Request or Publish
if: steps.flags.outputs.latest == 'true'
id: changesets
uses: changesets/action@v1
Expand All @@ -49,7 +49,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create Release Pull Request or Publish (for legacy patch release)
- name: (legacy) Create Release Pull Request or Publish
if: steps.flags.outputs.latest != 'true'
id: changesets_legacy
uses: changesets/action@v1
Expand All @@ -61,3 +61,16 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# note that this runs on every PR that's merged.
- name: (next) Create Release Pull Request or Publish
id: changesets_next
uses: changesets/action@v1
with:
version: yarn changeset version --snapshot next
publish: yarn changeset publish --tag next
commit: '[ci] release ${{ github.ref_name }}'
title: '[ci] release ${{ github.ref_name }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ There are two ways you can develop Hydrogen-UI components:
2. Edit the component or the component's story `[ComponentName].stories.tsx`
- TODO: setup and document how to link this package to the demo store
<!-- - Develop components in the demo store:
1. Add `"@hydrogen/react": "{major}.{minor}.{patch}"` to the demo-store's `package.json`
1. Add `"@shopify/hydrogen-react": "{major}.{minor}.{patch}"` to the demo-store's `package.json`
2. Run `yarn` then `yarn dev` in the demo-store directory,
3. Run `yarn dev:demo` in the hydrogen-ui directory -->

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
],
"scripts": {
"build": "turbo run build",
"ci:checks": "turbo run typecheck test:ci lint format:check",
"dev": "turbo run dev --parallel",
"lint": "run-p lint:js lint:language",
"lint:js": "eslint --no-error-on-unmatched-pattern --ext .js,.ts,.jsx,.tsx packages/*/src",
"lint:language": "alex {.,.changeset}",
"format": "prettier --write --ignore-unknown .",
"format:check": "prettier --check --ignore-unknown .",
"ci:checks": "turbo run typecheck test:ci lint format:check"
"format:check": "prettier --check --ignore-unknown ."
},
"devDependencies": {
"@changesets/cli": "^2.25.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@hydrogen/react",
"name": "@shopify/hydrogen-react",
"version": "2022.7.0",
"description": "React components, hooks, and utilities for creating custom Shopify storefronts",
"homepage": "https://github.com/Shopify/hydrogen-ui/tree/main/packages/react",
Expand Down

0 comments on commit a36e228

Please sign in to comment.