Skip to content

Commit

Permalink
add release action, adapt PUBLISH.md from dataloader-codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
karmeleon committed Apr 29, 2024
1 parent 0bc0bec commit 0f81532
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Release new version
on:
release:
types: [created]

jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/setup-node@v4
with:
node-version: '16.x'
- run: pip3 install --user virtualenv
- run: make test

publish-npm:
needs: test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16.x'
registry-url: https://registry.npmjs.org/
- run: yarn
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
10 changes: 10 additions & 0 deletions PUBLISH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 📚 How to publish a new version

After merging your PR to master, you may want to release a new version of **lemon-reset** to NPM registry. Here comes the instructions.

## Steps

1. Figure out what kind of release you want to make, `major`, `minor` or `patch`. We follow [Semantic Versioning](https://semver.org/#summary).
2. Update version in [package.json](package.json) directly in <https://github.com/Yelp/lemon-reset/edit/master/package.json> and commit changes
3. Draft a new release in <https://github.com/Yelp/lemon-reset/releases/new>. Remember to use tag `vX.Y.Z` instead of `X.Y.Z`
4. That's it. **Github Actions** will start a release process in the Actions tab.

0 comments on commit 0f81532

Please sign in to comment.