Skip to content

Commit

Permalink
Add CI publish step (#30)
Browse files Browse the repository at this point in the history
* Add prepare step

* Add changelog entry

* Clean & build before release

* Finalise
  • Loading branch information
markmur authored Jan 15, 2024
1 parent f3bd462 commit ea98e26
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish NPM Package

on:
release:
types:
- published
workflow_dispatch:

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Prepare release
run: |
yarn module clean
yarn module build
cd modules/@shopify/checkout-sheet-kit
npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

## 0.1.0 - January 15, 2024

Initial publication of the `@shopify/checkout-sheet-kit` package.

Please refer to the [Readme](./README.md) for setup intstructions and usage.

---

Note: breaking changes may be made during Dev Preview with minor version
increments, but will receive a major version increments after release for
General Availability.
21 changes: 21 additions & 0 deletions docs/contributing/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Release

The `@shopify/checkout-sheet-kit` module is published to the NPM package
registry with public access.

In order to publish a new version of the package, you must complete the
following steps:

1. Bump the version in `modules/@shopify/checkout-sheet-kit/package.json` to an
appropriate value.
2. Add a [Changelog](./CHANGELOG.md) entry.
3. Merge your PR to `main`.
4. Create a [Release](/releases) for your new version.

Creating and publishing a Github release with begin the automated process of
publishing the latest version of the package to NPM. It will clean the module
folder, build a new version, run `npm pack --dry-run` to verify the contents and
publish to the NPM registry.

You can follow the release action process via
https://github.com/Shopify/checkout-sheet-kit-react-native/actions/workflows/publish.yml.

0 comments on commit ea98e26

Please sign in to comment.