Skip to content

Commit

Permalink
ci: automate release creation (#85)
Browse files Browse the repository at this point in the history
Introduce a workflow that create the GitHub release and publish it along
with the Git tag.
  • Loading branch information
tbouffard committed Jan 10, 2024
1 parent 4ce9d5c commit a11e699
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path_to_locally_installed_maxgraph>/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).

0 comments on commit a11e699

Please sign in to comment.