-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpost-release-create-gh-release_Examples_repo.yml
More file actions
75 lines (66 loc) · 2.66 KB
/
post-release-create-gh-release_Examples_repo.yml
File metadata and controls
75 lines (66 loc) · 2.66 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
# This workflow includes attachments specific after a new version tag is pushed in the main repository.
# On 2026-01-23, this is not something that exists in the actual examples repository, but it is prepared for future use.
# This is also done to validate the implementation proposed in https://github.com/maxGraph/maxGraph/pull/996 which could serve as a model for other repositories.
name: Create GitHub release (examples repo)
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
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Upload fake files to simulate built examples
uses: actions/upload-artifact@v7
with:
name: 'maxgraph_${{ needs.compute_environment_variables.outputs.version }}_examples.zip'
path: |
DESCRIPTION
LICENSE
tsconfig.json
create_release:
needs: [ compute_environment_variables, build_examples ]
runs-on: ubuntu-24.04
permissions:
contents: write # create the GH release
steps:
- name: Set env
run: |
echo "VERSION=${{ needs.compute_environment_variables.outputs.version }}" >> $GITHUB_ENV
echo "TAG=${GITHUB_REF_NAME}" >> $GITHUB_ENV
- name: Download examples artifact
uses: actions/download-artifact@v8
with:
name: maxgraph_${{ env.VERSION }}_examples.zip
path: artifacts/examples
- name: Create zip files for release
run: |
cd artifacts/examples
zip -r ../../maxgraph_${{ env.VERSION }}_examples.zip .
- name: Create release
uses: ncipollo/release-action@v1
with:
body: |
Examples for [bpmn-visualization@${{ env.VERSION }}](https://github.com/process-analytics/bpmn-visualization-js/releases/tag/${{ env.TAG }}).
Live examples are available for [${{ env.VERSION }}](https://cdn.statically.io/gh/process-analytics/bpmn-visualization-examples/${{ env.TAG }}/examples/index.html).
draft: true # Generate here in draft to not mess with the release-drafter workflow, this is not required in the targeted repository
generateReleaseNotes: true
name: ${{ env.VERSION }}
artifacts: |
maxgraph_${{ env.VERSION }}_examples.zip