-
Notifications
You must be signed in to change notification settings - Fork 9
63 lines (53 loc) · 1.66 KB
/
build-info.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
name: Build Information (Last Tag)
on: workflow_dispatch
jobs:
info:
name: Info
runs-on: ubuntu-20.04
outputs:
release_type: ${{steps.cf_release_type.outputs.value }}
cf_project: ${{steps.cf_project.outputs.value }}
mod_id: ${{steps.mod_id.outputs.value }}
version: ${{steps.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Release Type
id: cf_release_type
uses: christian-draeger/[email protected]
with:
path: './gradle.properties'
property: 'cf_release_type'
- name: Project ID
id: cf_project
uses: christian-draeger/[email protected]
with:
path: './gradle.properties'
property: 'cf_project'
- name: Mod ID
id: mod_id
uses: christian-draeger/[email protected]
with:
path: './gradle.properties'
property: 'mod_id'
- name: Find Current Tag
id: current
uses: jimschubert/query-tag-action@v1
with:
include: 'v*'
exclude: '*-rc*'
commit-ish: '@'
skip-unshallow: 'true'
- name: Semver Version
id: version
run: |
version=$(echo "${{steps.current.outputs.tag}}" | cut -dv -f2)
echo "::set-output name=version::$version"
output:
name: Output Info
runs-on: ubuntu-20.04
needs: [ info ]
steps:
- run: echo "${{needs.info.outputs.mod_id}} version ${{needs.info.outputs.version}}; releasing as ${{needs.info.outputs.release_type}}"