-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (81 loc) · 2.68 KB
/
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
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
name: Release
permissions:
contents: write
on:
push:
tags:
- '*.*'
jobs:
ghrelease:
name: Publish sources on GitHub Release
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure
run: |
./bootstrap && ./configure
sudo apt update
sudo apt install bzip3 -y
bzip3 --version
- name: Build source packages
run: |
make update-ChangeLog
make dist-gzip
make dist-zip
gzip -dk xpar-${{ github.ref_name }}.tar.gz
bzip3 xpar-${{ github.ref_name }}.tar
bzip2 -k xpar-${{ github.ref_name }}.tar
zstd -k xpar-${{ github.ref_name }}.tar
- name: Publish Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
xpar-${{ github.ref_name }}.tar
xpar-${{ github.ref_name }}.tar.bz2
xpar-${{ github.ref_name }}.tar.bz3
xpar-${{ github.ref_name }}.tar.gz
xpar-${{ github.ref_name }}.tar.zst
xpar-${{ github.ref_name }}.zip
- name: Upload source package artifact
uses: actions/upload-artifact@v3
with:
name: xpar-${{ github.ref_name }}
path: xpar-${{ github.ref_name }}.tar.gz
binaries:
name: Publish Binaries on GitHub Release
needs: [ ghrelease ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- [ "x86_64", "CC=x86_64-w64-mingw32-gcc --host x86_64-w64-mingw32 --enable-static --enable-lto --enable-x86-64", "gcc-mingw-w64-x86-64" ]
- [ "i686", "CC=i686-w64-mingw32-gcc --host i686-w64-mingw32 --enable-static --enable-lto", "gcc-mingw-w64-i686" ]
steps:
- name: Download source package artifact
uses: actions/download-artifact@v3
with:
name: xpar-${{ github.ref_name }}
- name: Extract source package
run: tar --strip-components=1 -xf xpar-${{ github.ref_name }}.tar.gz
- name: Install cross-compile dependencies
if: ${{ matrix.target[2] }}
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.target[2] }}
- name: Install nasm
run: sudo apt-get install nasm -y
- name: Configure
run: ./configure --bindir=/ --program-suffix=-${{ matrix.target[0] }} ${{ matrix.target[1] }}
- name: Make
run: |
make
make DESTDIR=$(pwd)/output install-exec
- name: Publish binary
uses: softprops/action-gh-release@v2
with:
files: |
output/xpar-${{ matrix.target[0] }}*