-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c972c6f
commit 043943d
Showing
4 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*' | ||
|
||
jobs: | ||
ghrelease: | ||
name: Publish sources on GitHub Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Configure | ||
run: | | ||
./bootstrap && ./configure | ||
sudo apt install bzip3 -y | ||
- name: Build source packages | ||
run: | | ||
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 | ||
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-linux", "--enable-static --enable-lto", "" ] | ||
- [ "x86_64", "CC=x86_64-w64-mingw32-gcc --host x86_64-w64-mingw32 --enable-static --enable-lto", "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: 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] }}* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters