-
Notifications
You must be signed in to change notification settings - Fork 110
83 lines (72 loc) · 2.31 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Release
on:
pull_request:
push:
paths-ignore:
- '**.md'
tags:
- 'v*'
- 'develop*'
jobs:
build:
# ubuntu-latest is 22.04 - Feb 2023
runs-on: ubuntu-latest
steps:
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 17
- name: Install asciidoctor
run: sudo gem install asciidoctor-pdf --pre
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build OH distributions
run: make
env:
CI: false
- name: Create draft release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
OpenHospital-*.tar.gz
OpenHospital-*.zip
body_path: RELEASE_NOTES.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
- name: Rename artifact
if: startsWith(github.ref, 'refs/tags/develop')
run: |
mv OpenHospital-develop-multiarch-client.zip OpenHospital-dev${{ steps.date.outputs.date }}-multiarch-client.zip
mv OpenHospital-develop-x86_64-EXPERIMENTAL.zip OpenHospital-dev${{ steps.date.outputs.date }}-x86_64-EXPERIMENTAL.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete last dev release
if: startsWith(github.ref, 'refs/tags/develop')
uses: dev-drprasad/[email protected]
with:
repo: informatici/openhospital
keep_latest: 0
delete_tag_pattern: develop
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create dev release
if: startsWith(github.ref, 'refs/tags/develop')
uses: softprops/action-gh-release@v1
with:
name: Develop Release ${{ steps.date.outputs.date }}
prerelease: true
files: |
OpenHospital-dev${{ steps.date.outputs.date }}-multiarch-client.zip
OpenHospital-dev${{ steps.date.outputs.date }}-x86_64-EXPERIMENTAL.zip
# OpenHospital-*.tar.gz
# OpenHospital-*.zip
body: Development pre-release for testers
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}