-
Notifications
You must be signed in to change notification settings - Fork 8
85 lines (82 loc) · 2.3 KB
/
dist_archives.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
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
84
85
name: Make distribution archives
on:
workflow_dispatch:
inputs:
config-flags:
description: 'Configure flags to prepare the source directory'
default: ''
required: false
type: string
zip:
description: 'Additionally create ZIP archive next to default GZIP'
required: false
default: false
type: boolean
artifact-name:
description: 'Name of the artifact'
required: false
default: 'distribution-archives'
type: string
workflow_call:
inputs:
config-flags:
description: 'Configure flags to prepare the source directory'
default: ''
required: false
type: string
zip:
description: 'Additionally create ZIP archive next to default GZIP'
required: false
default: false
type: boolean
artifact-name:
description: 'Name of the artifact'
required: false
default: 'distribution-archives'
type: string
outputs:
version_number:
description: "The Version number of this build"
value: ${{ jobs.make_dist.outputs.version_number }}
jobs:
make_dist:
runs-on: ubuntu-latest
# Map the job outputs to step outputs
outputs:
version_number: ${{ steps.tarball.outputs.version_number }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install prerequisites
run: |
sudo apt-get update
sudo apt-get -y install \
build-essential \
autoconf \
automake \
gengetopt \
libtool
- name: Autotools setup
run: |
autoreconf -i
- name: Configure
run: ./configure ${{ inputs.config-flags }}
- name: Make tarball
id: tarball
run: |
make dist-gzip
version_number=$(ls RNAcode-*.tar.gz)
version_number="${version_number#RNAcode-}"
version_number="${version_number%.tar.gz}"
echo "version_number=${version_number}" >> "$GITHUB_OUTPUT"
- name: Make ZIP
if: ${{ inputs.zip }}
run: make dist-zip
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact-name }}
path: |
RNAcode-*.tar.gz
RNAcode-*.zip
retention-days: 3