Skip to content

Commit a11e699

Browse files
authored
ci: automate release creation (#85)
Introduce a workflow that create the GitHub release and publish it along with the Git tag.
1 parent 4ce9d5c commit a11e699

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'Version in the x.y.z form. Must match a released version of maxGraph'
7+
required: true
8+
9+
env:
10+
VERSION: ${{ inputs.version }}
11+
TAG: v${{ inputs.version }}
12+
13+
jobs:
14+
create_release:
15+
runs-on: ubuntu-22.04
16+
permissions:
17+
contents: write # create the GH release
18+
steps:
19+
- name: Create release
20+
uses: ncipollo/release-action@v1
21+
with:
22+
body: |
23+
Relates to [maxGraph ${{ env.VERSION }}](https://github.com/maxGraph/maxGraph/releases/tag/${{ env.TAG }}).
24+
generateReleaseNotes: true
25+
name: ${{ env.VERSION }}
26+
tag: ${{ env.TAG }}

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,16 @@ In this folder where you clone the `maxgraph-integration-examples` project, go t
4848
Repack of maxgraph is automatically available in the examples
4949
- alternative: `npm install <path_to_locally_installed_maxgraph>/packages/core/maxgraph-core-0.1.0.tgz`. This changes
5050
the package.json file. You must run this command again each time you rebuild the maxgraph npm package.
51+
52+
53+
## Release
54+
55+
The versioning in this repository follow the versioning of `maxGraph`. For example, version _0.5.0_ uses `maxGraph` _0.5.0_.
56+
57+
So, prior releasing a new version of this version, the maxGraph version must have been updated:
58+
- 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.
59+
- Validate that the examples work: use the artifact built by GitHub Actions to test the various applications locally.
60+
61+
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:
62+
- creates the Git tag
63+
- publishes a GitHub release including the [automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes).

0 commit comments

Comments
 (0)