forked from maxGraph/maxGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (72 loc) · 3.98 KB
/
Copy pathcreate-github-release.yml
File metadata and controls
96 lines (72 loc) · 3.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Create GitHub release
on:
push:
tags:
- v*
jobs:
create_release:
runs-on: ubuntu-24.04
permissions:
contents: write # create the GH release
steps:
- name: Set env
run: |
echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
echo "RELEASE_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Get milestone number
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "Fetching milestone for version ${{ env.VERSION }}..."
MILESTONE_NUMBER=$(gh api graphql -f query='
query($version: String!) {
repository(owner: "${{ github.repository_owner }}", name: "${{ github.event.repository.name }}") {
milestones(first: 1, query: $version) {
nodes { number }
}
}
}' -f version="${{ env.VERSION }}" --jq '.data.repository.milestones.nodes[0].number')
echo "Found milestone: ${MILESTONE_NUMBER}"
echo "MILESTONE_NUMBER=${MILESTONE_NUMBER:-x}" >> $GITHUB_ENV
- name: Create release
uses: ncipollo/release-action@v1
with:
body: |
_Version ${{ env.VERSION }} released on ${{ env.RELEASE_DATE }}._
**Adapt this one liner summary**
⚡ This new version improves ... ⚡
_If appropriate, briefly explain the contents of the new version._
## Resources
**TODO: Validate the milestone URL and update it if needed**
- **npm package**: [@maxgraph/core ${{ env.VERSION }}](https://www.npmjs.com/package/@maxgraph/core/v/${{ env.VERSION }})
- **Fixed issues**: [milestone ${{ env.VERSION }}](https://github.com/maxGraph/maxGraph/milestone/${{ env.MILESTONE_NUMBER }}?closed=1)
- **Documentation**: [maxgraph_${{ env.VERSION }}_website.zip](https://github.com/maxGraph/maxGraph/releases/download/v${{ env.VERSION }}/maxgraph_${{ env.VERSION }}_website.zip)
- **Examples**: [maxgraph_${{ env.VERSION }}_examples.zip](https://github.com/maxGraph/maxGraph/releases/download/v${{ env.VERSION }}/maxgraph_${{ env.VERSION }}_examples.zip)
- **Changelog** (only includes a summary and breaking changes): [changelog](https://github.com/maxGraph/maxGraph/tree/v${{ env.VERSION }}/CHANGELOG.md)
## Breaking changes
**TODO: keep if relevant and follow the guidelines below**
- explain why it is introduced
- explain the impact (use case, usage, impact a lot of user or only few, ....)
- add references to issue or pull request to help users to understand the breaking change
### Removal of deprecated API
**TODO: keep if relevant and follow the guidelines below**
- list API
- add reference to the version and release notes where it was announced as "deprecated"
## Deprecated APIs
**TODO: keep if relevant and follow the guidelines below**
- list the APIs
- explain why they are deprecated
- provide the new API to use instead. If none exist, mention it
- explain in which version it will be removed. We usually keep 3 minor versions prior removal.
- ensure that an issue exists to track the removal (one by version is OK) and it is attached to a milestone related to the version
## Highlights
_Note_: use [release 0.5.0](https://github.com/maxGraph/maxGraph/releases/tag/v0.5.0) and [release 0.6.0](https://github.com/maxGraph/maxGraph/releases/tag/v0.6.0) as examples
**Add screenshots, animations or videos to make your description more user-friendly!**
### Change 1
some explanations....
> [!NOTE]
> For more details, see #<PR_NUMBER>.
### Other changes.... adapt and create more paragraphs
draft: true
generateReleaseNotes: true
name: ${{ env.VERSION }}