-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.98 KB
/
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
name: Create Release
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🏷️ Get version from tag
id: tag_name
run: echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
shell: bash
- uses: actions/checkout@v2
- name: 📄 Get Changelog Entry
uses: mindsers/changelog-reader-action@v2
id: changelog_reader
with:
version: ${{ steps.tag_name.outputs.current_version }}
# Persist the FHIR Package Cache between runners, used by tests.
# Doc: https://confluence.hl7.org/display/FHIR/FHIR+Package+Cache
- name: 🗂️ Cache FHIR Packages
uses: actions/cache@v2
with:
path: |
~/.fhir/packages
key: fhir-packages
- name: ☕ Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: gradle
- name: 🛠️ Build
run: gradle test shadowjar --no-daemon
- name: 🧹 Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: 📦 Create/update release
uses: ncipollo/release-action@v1
with:
tag: v${{ steps.changelog_reader.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "build/libs/fhir-validator-junit-${{ steps.changelog_reader.outputs.version }}.jar"