-
Notifications
You must be signed in to change notification settings - Fork 80
49 lines (49 loc) · 1.65 KB
/
full-release-note.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
name: full-release-note
on:
release:
types: ["published"]
workflow_dispatch:
inputs:
version:
description: 'Use set Platform Version to:'
required: false
type: string
default: ''
jobs:
run:
runs-on: ubuntu-latest
steps:
- run: |
[ -z "${{secrets.GITHUB_TOKEN}}" ] \
&& echo "🚫 **GITHUB_TOKEN** is not defined, check that **${{github.repository}}** repo has a valid secret" \
| tee -a $GITHUB_STEP_SUMMARY && exit 1 || exit 0
name: Check secrets
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '18'
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- uses: stCarolas/setup-maven@v5
with:
maven-version: '3.8.2'
- run: |
./scripts/generateBoms.sh
V="${{ github.event.inputs.version || github.event.release.tag_name }}"
mvn versions:set -DnewVersion=$V
./scripts/generateBoms.sh
name: Set project version and generate release note
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- if: ${{ always() && (github.event.release.tag_name || github.event.inputs.version) }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./scripts/generator/results/modules-release-notes.md
asset_name: "Full.Release.Note.md"
tag: ${{ github.event.inputs.version || github.event.release.tag_name }}
overwrite: true