From 5946b50c7ceb7ba516a11a074020dad1fd9c2553 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 9 Jun 2022 12:22:58 -0400 Subject: [PATCH] setting up an action to publish bpmn-js whenever there is a release. --- .github/workflows/publish.yml | 25 +++++++++++++++++++++++++ .github/workflows/tests.yml | 1 + README.md | 3 ++- RELEASE_PROCESS.md | 11 +++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml create mode 100644 RELEASE_PROCESS.md diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..6bc0615 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Tests + +# On release, run tests and deploy to NPM +on: + release: + +# Job Setup +jobs: + publish: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v2 #Checkout Repo + - uses: actions/setup-node@v1 #Setup Node + with: + node-version: 18 + - run: npm install + - run: npm test + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + access: public + - if: steps.publish.outputs.type != 'none' + run: | + echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a150eaa..f93bfda 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,3 +27,4 @@ jobs: run: | npm ci npm run test + diff --git a/README.md b/README.md index dec9993..8233f48 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ To build the example into the `public` folder execute npm run all ``` - ## License MIT + + diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md new file mode 100644 index 0000000..84cab55 --- /dev/null +++ b/RELEASE_PROCESS.md @@ -0,0 +1,11 @@ +## Releases + +Be sure to edit the package.json, and update the version. Releases won't create +a new NPM package unless the version was updated. Be sure to create a new version +that matches +And also edit setup.py and assure that has the same release tag. +New versions of SpiffWorkflow are automatically published to PyPi whenever +a maintainer of our GitHub repository creates a new release on GitHub. This +is managed through GitHub's actions. The configuration of which can be +found in .github/workflows/.... +Just create a release in GitHub that mathches the release number in doc/conf.py