-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (53 loc) · 1.59 KB
/
umr-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
name: Create UMR-Release
on:
push:
branches: main
paths:
- "02-dockerfiles/**.Dockerfile"
- "!02-dockerfiles/**_devel.Dockerfile"
workflow_dispatch:
inputs:
tag_suffix:
description: 'Tag suffix'
default: 0
required: true
type: string
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set version from date
id: tag_id
run: |
VAR="${{ github.event.inputs.tag_suffix }}"
if [[ ${VAR} == "" || ${VAR} == "0" ]]; then
CTAG="$(date '+%Y.%m.%d')"
else
CTAG="$(date '+%Y.%m.%d')-${VAR}"
fi
echo "ctag=${CTAG}" >>$GITHUB_OUTPUT
- name: Set prerelease name
id: release_id
run: |
RELEASENAME="v${{ steps.tag_id.outputs.ctag }} (UMR/RSTUDIO/SHINY)"
echo "releasename=${RELEASENAME}" >>$GITHUB_OUTPUT
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: false
custom_tag: ${{ steps.tag_id.outputs.ctag }}
tag_prefix: "v"
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.release_id.outputs.releasename }}
generateReleaseNotes: true
allowUpdates: false
token: ${{ secrets.GITHUB_TOKEN }}