From 0f8153265121cc942a4f2e338b6dd045ec680bb5 Mon Sep 17 00:00:00 2001 From: Shawn Walton Date: Mon, 29 Apr 2024 12:14:14 -0700 Subject: [PATCH] add release action, adapt PUBLISH.md from dataloader-codegen --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ PUBLISH.md | 10 ++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 PUBLISH.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3f38a35 --- /dev/null +++ b/.github/workflows/release.yml @@ -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}} diff --git a/PUBLISH.md b/PUBLISH.md new file mode 100644 index 0000000..643485c --- /dev/null +++ b/PUBLISH.md @@ -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 and commit changes +3. Draft a new release in . 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.