-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (52 loc) · 1.48 KB
/
release-draft.yaml
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
name: Release Drafter
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
permissions:
contents: write
jobs:
# build-artifact:
# name: Build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-java@v4
# with:
# java-version: 21
# distribution: 'temurin'
# cache: 'maven'
#
# - name: Resolve/Update Dependencies
# run: mvn package dependency:resolve-plugins dependency:go-offline
#
# - name: Build (and run tests)
# run: mvn clean install
#
# - name: Save test results
# run: |
# mkdir -p ~/test-results/junit/
# find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/test-results/junit/ \;
update_release_draft:
# needs: build-artifact
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setting version
run: |
export GIT_COMMIT_DATE=$(git log -1 --pretty='%ad' --date=format:'%Y.%m%d.%H%M%S')
export VERSION=${GIT_COMMIT_DATE}
echo "VERSION=${GIT_COMMIT_DATE}" >> $GITHUB_ENV
echo "Setting version $VERSION"
- uses: release-drafter/release-drafter@v5
with:
version: ${{ env.VERSION }}
tag: ${{ env.VERSION }}
name: "Release ${{ env.VERSION }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}