-
Notifications
You must be signed in to change notification settings - Fork 22
80 lines (78 loc) · 2.28 KB
/
static.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
name: Build static version of imaptest
on:
pull_request:
push:
paths:
- 'src/**'
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout imaptest
uses: actions/checkout@v4
with:
path: imaptest
- name: Checkout dovecot
uses: actions/checkout@v4
with:
repository: dovecot/core
path: core
- name: Install gettext (missing from GH Actions image)
run: |
sudo apt install -y gettext
- name: Build dovecot libraries
working-directory: ${{ github.workspace }}/core
run: |
./autogen.sh
./configure --without-shared-libs --enable-static --disable-shared
make
- name: Build imaptest
working-directory: ${{ github.workspace }}/imaptest
run: |
./autogen.sh
./configure --with-dovecot=../core --enable-static --disable-shared
make
- name: Upload Artifact
if: ${{ github.repository == 'dovecot/imaptest' && github.ref == 'refs/heads/main' }}
uses: actions/upload-artifact@v3
with:
name: imaptest
path: imaptest/src/imaptest
publish:
needs: build
if: ${{ github.repository == 'dovecot/imaptest' && github.ref == 'refs/heads/main' }}
name: Publish
runs-on: ubuntu-22.04
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: imaptest
path: ./
- name: Make imaptest executable
run: |
chmod +x imaptest
- name: TAR/GZ imaptest
run: |
tar czfv imaptest.tgz imaptest
- name: Generate SHA256 checksum
run: |
sha256sum imaptest.tgz > SHA256SUMS.txt
- name: List files
run: ls -rl
- name: Update latest Release
uses: andelf/nightly-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: latest
name: 'ImapTest Latest Release'
draft: false
body: |
This is a static binary of imaptest (built on Ubuntu 22.04).
This should work on any modern Linux machine using libc.
files: |
./SHA256SUMS.txt
./imaptest.tgz