1
+ name : Release
2
+
3
+ permissions :
4
+ contents : write
5
+
6
+ on :
7
+ push :
8
+ tags :
9
+ - ' *.*'
10
+
11
+ jobs :
12
+ ghrelease :
13
+ name : Publish sources on GitHub Release
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@v3
18
+ - name : Configure
19
+ run : |
20
+ ./bootstrap && ./configure
21
+ sudo apt install bzip3 -y
22
+ - name : Build source packages
23
+ run : |
24
+ make dist-gzip
25
+ make dist-zip
26
+ gzip -dk xpar-${{ github.ref_name }}.tar.gz
27
+ bzip3 xpar-${{ github.ref_name }}.tar
28
+ bzip2 -k xpar-${{ github.ref_name }}.tar
29
+ zstd -k xpar-${{ github.ref_name }}.tar
30
+ - name : Publish Release
31
+ uses : softprops/action-gh-release@v2
32
+ env :
33
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+ with :
35
+ files : |
36
+ xpar-${{ github.ref_name }}.tar
37
+ xpar-${{ github.ref_name }}.tar.bz2
38
+ xpar-${{ github.ref_name }}.tar.bz3
39
+ xpar-${{ github.ref_name }}.tar.gz
40
+ xpar-${{ github.ref_name }}.tar.zst
41
+ xpar-${{ github.ref_name }}.zip
42
+ - name : Upload source package artifact
43
+ uses : actions/upload-artifact@v3
44
+ with :
45
+ name : xpar-${{ github.ref_name }}
46
+ path : xpar-${{ github.ref_name }}.tar.gz
47
+ binaries :
48
+ name : Publish Binaries on GitHub Release
49
+ needs : [ ghrelease ]
50
+ runs-on : ubuntu-latest
51
+ strategy :
52
+ fail-fast : false
53
+ matrix :
54
+ target :
55
+ - [ "x86_64-linux", "--enable-static --enable-lto", "" ]
56
+ - [ "x86_64", "CC=x86_64-w64-mingw32-gcc --host x86_64-w64-mingw32 --enable-static --enable-lto", "gcc-mingw-w64-x86-64" ]
57
+ - [ "i686", "CC=i686-w64-mingw32-gcc --host i686-w64-mingw32 --enable-static --enable-lto", "gcc-mingw-w64-i686" ]
58
+ steps :
59
+ - name : Download source package artifact
60
+ uses : actions/download-artifact@v3
61
+ with :
62
+ name : xpar-${{ github.ref_name }}
63
+ - name : Extract source package
64
+ run : tar --strip-components=1 -xf xpar-${{ github.ref_name }}.tar.gz
65
+ - name : Install cross-compile dependencies
66
+ if : ${{ matrix.target[2] }}
67
+ run : |
68
+ sudo apt-get update
69
+ sudo apt-get install -y ${{ matrix.target[2] }}
70
+ - name : Configure
71
+ run : ./configure --bindir=/ --program-suffix=-${{ matrix.target[0] }} ${{ matrix.target[1] }}
72
+ - name : Make
73
+ run : |
74
+ make
75
+ make DESTDIR=$(pwd)/output install-exec
76
+ - name : Publish binary
77
+ uses : softprops/action-gh-release@v2
78
+ with :
79
+ files : |
80
+ output/xpar-${{ matrix.target[0] }}*
0 commit comments