forked from jgraph/mxgraph
-
Notifications
You must be signed in to change notification settings - Fork 198
149 lines (117 loc) · 5.67 KB
/
create-github-release.yml
File metadata and controls
149 lines (117 loc) · 5.67 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: Create GitHub release
on:
push:
tags:
- v*
jobs:
compute_environment_variables:
runs-on: ubuntu-24.04
permissions: {}
outputs:
version: ${{ steps.set_version.outputs.version }}
steps:
- name: Set version
id: set_version
run: |
VERSION=${GITHUB_REF_NAME#v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
build_examples:
needs: compute_environment_variables
permissions:
contents: read
uses: ./.github/workflows/_reusable_build_examples.yml
with:
artifact-name: 'maxgraph_${{ needs.compute_environment_variables.outputs.version }}_examples.zip'
generate_website:
needs: compute_environment_variables
permissions:
contents: read
uses: ./.github/workflows/_reusable_generate_website.yml
with:
artifact-name: 'maxgraph_${{ needs.compute_environment_variables.outputs.version }}_website.zip'
create_release:
runs-on: ubuntu-24.04
needs: [compute_environment_variables, build_examples, generate_website]
permissions:
contents: write # create the GH release
steps:
- name: Set env
run: |
echo "VERSION=${{ needs.compute_environment_variables.outputs.version }}" >> $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: Download examples artifact
uses: actions/download-artifact@v8
with:
name: maxgraph_${{ env.VERSION }}_examples.zip
path: artifacts/examples
- name: Download website artifact
uses: actions/download-artifact@v8
with:
name: maxgraph_${{ env.VERSION }}_website.zip
path: artifacts/website
- name: Create zip files for release
run: |
cd artifacts/examples
zip -r ../../maxgraph_${{ env.VERSION }}_examples.zip .
cd ../website
zip -r ../../maxgraph_${{ env.VERSION }}_website.zip .
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: |
maxgraph_${{ env.VERSION }}_examples.zip
maxgraph_${{ env.VERSION }}_website.zip
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 }}