diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..496ad14 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release +on: + workflow_dispatch: + inputs: + version: + description: 'Version in the x.y.z form. Must match a released version of maxGraph' + required: true + +env: + VERSION: ${{ inputs.version }} + TAG: v${{ inputs.version }} + +jobs: + create_release: + runs-on: ubuntu-22.04 + permissions: + contents: write # create the GH release + steps: + - name: Create release + uses: ncipollo/release-action@v1 + with: + body: | + Relates to [maxGraph ${{ env.VERSION }}](https://github.com/maxGraph/maxGraph/releases/tag/${{ env.TAG }}). + generateReleaseNotes: true + name: ${{ env.VERSION }} + tag: ${{ env.TAG }} diff --git a/README.md b/README.md index ec153de..24ab480 100644 --- a/README.md +++ b/README.md @@ -48,3 +48,16 @@ In this folder where you clone the `maxgraph-integration-examples` project, go t Repack of maxgraph is automatically available in the examples - alternative: `npm install /packages/core/maxgraph-core-0.1.0.tgz`. This changes the package.json file. You must run this command again each time you rebuild the maxgraph npm package. + + +## Release + +The versioning in this repository follow the versioning of `maxGraph`. For example, version _0.5.0_ uses `maxGraph` _0.5.0_. + +So, prior releasing a new version of this version, the maxGraph version must have been updated: + - Dependencies in this repository are automatically updated by Dependabot, so you can trigger a new Dependabot run or wait for the next scheduled Dependabot run for this update to take place. + - Validate that the examples work: use the artifact built by GitHub Actions to test the various applications locally. + +Once maxGraph has been updated, the release can be done by running the [release workflow](https://github.com/maxGraph/maxgraph-integration-examples/actions/workflows/release.yml) which: + - creates the Git tag + - publishes a GitHub release including the [automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes).