-
Notifications
You must be signed in to change notification settings - Fork 19
67 lines (56 loc) · 1.84 KB
/
draft-release.yml
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
name: "[Releases] Generate Draft Release"
on:
workflow_dispatch:
workflow_call:
jobs:
compile-noencryption:
uses: Doclic/NoEncryption/.github/workflows/compile-noencryption.yml@main
generate-markdown:
runs-on: ubuntu-latest
needs: [compile-noencryption]
steps:
- name: Checkout repository
id: checkout
uses: actions/checkout@v3
- name: Get current POM version
id: get-version
uses: entimaniac/read-pom-version-action@1.0.0
- name: Run python script
id: run-py
run: |
cd .github/workflows/scripts/draft-release-markdown-generator/
python draft-release-markdown-generator.py -n ../../../meta -r Doclic/NoEncryption -t ${{ steps.get-version.outputs.version }}
shell: sh
- name: Read output.md
id: read-md
uses: juliangruber/read-file-action@v1
with:
path: .github/workflows/scripts/draft-release-markdown-generator/output.md
outputs:
markdown: ${{ steps.read-md.outputs.content }}
version: ${{ steps.get-version.outputs.version }}
generate-release:
runs-on: ubuntu-latest
needs: [generate-markdown]
steps:
- name: Checkout repository
id: checkout
uses: actions/checkout@v3
- name: Download build artifacts
id: download-build-artifacts
uses: actions/download-artifact@v3
with:
name: NoEncryption
path: NoEncryption/
- name: Generate draft release
id: generate-release
uses: ncipollo/release-action@v1
with:
artifacts: |
NoEncryption/**.jar
body: ${{ needs.generate-markdown.outputs.markdown }}
draft: true
name: ${{ needs.generate-markdown.outputs.version }}
skipIfReleaseExists: true
replacesArtifacts: false
tag: ${{ needs.generate-markdown.outputs.version }}