chore: automatically build & upload release assets
This commit is contained in:
315
.github/workflows/release.yml
vendored
Normal file
315
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,315 @@
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
name: Upload Release Asset
|
||||
|
||||
jobs:
|
||||
linux64-cli:
|
||||
name: Linux64 CLI static
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: install prerequisites
|
||||
run: sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man jq
|
||||
|
||||
- name: configure
|
||||
run: CLI_ONLY=1 ./configure
|
||||
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc) && make static && mv -f dvdisaster-static dvdisaster
|
||||
|
||||
- name: check executable
|
||||
run: |
|
||||
./dvdisaster --version && ./dvdisaster --version | grep -q -e UNKNOWN -e dirty || true
|
||||
file dvdisaster && file dvdisaster | grep -q 'ELF 64' && file dvdisaster | grep -q 'statically linked'
|
||||
|
||||
- name: build dist
|
||||
id: dist
|
||||
run: |
|
||||
archive=dvdisaster-$(echo "${{ github.ref }}" | grep -Eo '[^/]+$')-linux64-static-cli-only.zip
|
||||
upload_url=$(jq -r '.release.upload_url' < $GITHUB_EVENT_PATH)
|
||||
echo "Archive name is $archive"
|
||||
echo "Upload URL is $upload_url"
|
||||
echo "::set-output name=archive::$archive"
|
||||
echo "::set-output name=upload_url::$upload_url"
|
||||
mkdir dist
|
||||
man -t documentation/dvdisaster.en.1 | ps2pdf - dist/dvdisaster.pdf
|
||||
mv dvdisaster documentation/dvdisaster.*.1 documentation/user-manual/manual.pdf dist/
|
||||
mv dist ${archive/.zip/}
|
||||
zip -9r $archive ${archive/.zip/}
|
||||
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.dist.outputs.upload_url }}
|
||||
asset_path: ./${{ steps.dist.outputs.archive }}
|
||||
asset_name: ${{ steps.dist.outputs.archive }}
|
||||
asset_content_type: application/zip
|
||||
|
||||
win64-gui:
|
||||
name: Windows64 GUI
|
||||
runs-on: windows-2016
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: false
|
||||
install: git diffutils make pkg-config mingw-w64-x86_64-gtk2 mingw-w64-x86_64-glib2 mingw-w64-x86_64-gcc mingw-w64-x86_64-ghostscript mingw-w64-x86_64-jq mingw-w64-x86_64-ntldd-git man zip
|
||||
|
||||
- run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: configure
|
||||
run: ./configure
|
||||
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
|
||||
- name: check executable
|
||||
run: |
|
||||
./dvdisaster.exe --version && ./dvdisaster --version | grep -q -e UNKNOWN -e dirty || true
|
||||
file dvdisaster.exe && file dvdisaster.exe | grep -q 'x86-64, for MS Windows'
|
||||
|
||||
- name: build dist
|
||||
id: dist
|
||||
run: |
|
||||
archive=dvdisaster-$(echo "${{ github.ref }}" | grep -Eo '[^/]+$')-win64.zip
|
||||
upload_url=$(jq -r '.release.upload_url' < $GITHUB_EVENT_PATH)
|
||||
echo "Archive name is $archive"
|
||||
echo "Upload URL is $upload_url"
|
||||
echo "::set-output name=archive::$archive"
|
||||
echo "::set-output name=upload_url::$upload_url"
|
||||
mkdir dist
|
||||
mkdir -p dist/lib dist/locale dist/share/themes
|
||||
cp -vr locale/*/ dist/locale/
|
||||
cp -vr $MINGW_PREFIX/share/themes/MS-Windows dist/share/themes/
|
||||
cp -vr $MINGW_PREFIX/lib/gtk-2.0 dist/lib/
|
||||
find dist -type f -name "*.a" -delete
|
||||
rm -rf dist/lib/gtk-2.0/include
|
||||
ntldd -R dvdisaster
|
||||
for i in $(ntldd -R dvdisaster | awk '/mingw/ {print $3}' | tr \\\\ / | grep -Eo '[^/]+$')
|
||||
do
|
||||
test -e $MINGW_PREFIX/bin/$i && cp -va $MINGW_PREFIX/bin/$i dist/
|
||||
done
|
||||
man -t documentation/dvdisaster.en.1 | ps2pdf - dist/dvdisaster.pdf
|
||||
mv dvdisaster documentation/dvdisaster.*.1 documentation/user-manual/manual.pdf dist/
|
||||
mv dist ${archive/.zip/}
|
||||
zip -9r $archive ${archive/.zip/}
|
||||
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.dist.outputs.upload_url }}
|
||||
asset_path: ./${{ steps.dist.outputs.archive }}
|
||||
asset_name: ${{ steps.dist.outputs.archive }}
|
||||
asset_content_type: application/zip
|
||||
|
||||
win32-gui:
|
||||
name: Windows32 GUI
|
||||
runs-on: windows-2016
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW32
|
||||
update: false
|
||||
install: git diffutils make pkg-config mingw-w64-i686-gtk2 mingw-w64-i686-glib2 mingw-w64-i686-gcc mingw-w64-i686-ghostscript mingw-w64-i686-jq mingw-w64-i686-ntldd-git man zip
|
||||
|
||||
- run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: configure
|
||||
run: ./configure
|
||||
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
|
||||
- name: check executable
|
||||
run: |
|
||||
./dvdisaster.exe --version && ./dvdisaster --version | grep -q -e UNKNOWN -e dirty || true
|
||||
file dvdisaster.exe && file dvdisaster.exe | grep -q '386, for MS Windows'
|
||||
|
||||
- name: build dist
|
||||
id: dist
|
||||
run: |
|
||||
set -x
|
||||
set +o pipefail
|
||||
archive=dvdisaster-$(echo "${{ github.ref }}" | grep -Eo '[^/]+$')-win32.zip
|
||||
upload_url=$(jq -r '.release.upload_url' < $GITHUB_EVENT_PATH)
|
||||
echo "Archive name is $archive"
|
||||
echo "Upload URL is $upload_url"
|
||||
echo "::set-output name=archive::$archive"
|
||||
echo "::set-output name=upload_url::$upload_url"
|
||||
mkdir dist
|
||||
mkdir -p dist/lib dist/locale dist/share/themes
|
||||
cp -vr locale/*/ dist/locale/
|
||||
cp -vr $MINGW_PREFIX/share/themes/MS-Windows dist/share/themes/
|
||||
cp -vr $MINGW_PREFIX/lib/gtk-2.0 dist/lib/
|
||||
find dist -type f -name "*.a" -delete
|
||||
rm -rf dist/lib/gtk-2.0/include
|
||||
ntldd -R dvdisaster
|
||||
for i in $(ntldd -R dvdisaster | awk '/mingw/ {print $3}' | tr \\\\ / | grep -Eo '[^/]+$')
|
||||
do
|
||||
test -e $MINGW_PREFIX/bin/$i && cp -va $MINGW_PREFIX/bin/$i dist/
|
||||
done
|
||||
man -t documentation/dvdisaster.en.1 | ps2pdf - dist/dvdisaster.pdf
|
||||
mv dvdisaster documentation/dvdisaster.*.1 documentation/user-manual/manual.pdf dist/
|
||||
mv dist ${archive/.zip/}
|
||||
zip -9r $archive ${archive/.zip/}
|
||||
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.dist.outputs.upload_url }}
|
||||
asset_path: ./${{ steps.dist.outputs.archive }}
|
||||
asset_name: ${{ steps.dist.outputs.archive }}
|
||||
asset_content_type: application/zip
|
||||
|
||||
win64-cli:
|
||||
name: Windows64 CLI
|
||||
runs-on: windows-2016
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: false
|
||||
install: git diffutils make pkg-config mingw-w64-x86_64-glib2 mingw-w64-x86_64-gcc mingw-w64-x86_64-ghostscript mingw-w64-x86_64-jq mingw-w64-x86_64-ntldd-git man zip
|
||||
|
||||
- run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: configure
|
||||
run: CLI_ONLY=1 ./configure
|
||||
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
|
||||
- name: check executable
|
||||
run: |
|
||||
./dvdisaster.exe --version && ./dvdisaster --version | grep -q -e UNKNOWN -e dirty || true
|
||||
file dvdisaster.exe && file dvdisaster.exe | grep -q 'x86-64, for MS Windows'
|
||||
|
||||
- name: build dist
|
||||
id: dist
|
||||
run: |
|
||||
archive=dvdisaster-$(echo "${{ github.ref }}" | grep -Eo '[^/]+$')-win64-cli-only.zip
|
||||
upload_url=$(jq -r '.release.upload_url' < $GITHUB_EVENT_PATH)
|
||||
echo "Archive name is $archive"
|
||||
echo "Upload URL is $upload_url"
|
||||
echo "::set-output name=archive::$archive"
|
||||
echo "::set-output name=upload_url::$upload_url"
|
||||
mkdir dist
|
||||
mkdir -p dist/locale
|
||||
cp -vr locale/*/ dist/locale/
|
||||
ntldd -R dvdisaster
|
||||
for i in $(ntldd -R dvdisaster | awk '/mingw/ {print $3}' | tr \\\\ / | grep -Eo '[^/]+$')
|
||||
do
|
||||
test -e $MINGW_PREFIX/bin/$i && cp -va $MINGW_PREFIX/bin/$i dist/
|
||||
done
|
||||
man -t documentation/dvdisaster.en.1 | ps2pdf - dist/dvdisaster.pdf
|
||||
mv dvdisaster documentation/dvdisaster.*.1 documentation/user-manual/manual.pdf dist/
|
||||
mv dist ${archive/.zip/}
|
||||
zip -9r $archive ${archive/.zip/}
|
||||
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.dist.outputs.upload_url }}
|
||||
asset_path: ./${{ steps.dist.outputs.archive }}
|
||||
asset_name: ${{ steps.dist.outputs.archive }}
|
||||
asset_content_type: application/zip
|
||||
|
||||
win32-cli:
|
||||
name: Windows32 CLI
|
||||
runs-on: windows-2016
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW32
|
||||
update: false
|
||||
install: git diffutils make pkg-config mingw-w64-i686-glib2 mingw-w64-i686-gcc mingw-w64-i686-ghostscript mingw-w64-i686-jq mingw-w64-i686-ntldd-git man zip
|
||||
|
||||
- run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: configure
|
||||
run: CLI_ONLY=1 ./configure
|
||||
|
||||
- name: make
|
||||
run: nproc && make -j$(nproc)
|
||||
|
||||
- name: check executable
|
||||
run: |
|
||||
./dvdisaster.exe --version && ./dvdisaster --version | grep -q -e UNKNOWN -e dirty || true
|
||||
file dvdisaster.exe && file dvdisaster.exe | grep -q '386, for MS Windows'
|
||||
|
||||
- name: build dist
|
||||
id: dist
|
||||
run: |
|
||||
archive=dvdisaster-$(echo "${{ github.ref }}" | grep -Eo '[^/]+$')-win32-cli-only.zip
|
||||
upload_url=$(jq -r '.release.upload_url' < $GITHUB_EVENT_PATH)
|
||||
echo "Archive name is $archive"
|
||||
echo "Upload URL is $upload_url"
|
||||
echo "::set-output name=archive::$archive"
|
||||
echo "::set-output name=upload_url::$upload_url"
|
||||
mkdir dist
|
||||
mkdir -p dist/locale
|
||||
cp -vr locale/*/ dist/locale/
|
||||
ntldd -R dvdisaster
|
||||
for i in $(ntldd -R dvdisaster | awk '/mingw/ {print $3}' | tr \\\\ / | grep -Eo '[^/]+$')
|
||||
do
|
||||
test -e $MINGW_PREFIX/bin/$i && cp -va $MINGW_PREFIX/bin/$i dist/
|
||||
done
|
||||
man -t documentation/dvdisaster.en.1 | ps2pdf - dist/dvdisaster.pdf
|
||||
mv dvdisaster documentation/dvdisaster.*.1 documentation/user-manual/manual.pdf dist/
|
||||
mv dist ${archive/.zip/}
|
||||
zip -9r $archive ${archive/.zip/}
|
||||
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.dist.outputs.upload_url }}
|
||||
asset_path: ./${{ steps.dist.outputs.archive }}
|
||||
asset_name: ${{ steps.dist.outputs.archive }}
|
||||
asset_content_type: application/zip
|
||||
@@ -336,26 +336,5 @@ srcdist: INSTALL distclean manual manualclean
|
||||
@cd .. ; tar -c -j -X $(PKGNAME)/NODIST -f $(TAR_PREFIX)/$(PKGNAME).tar.bz2 $(PKGNAME)
|
||||
@cd .. ; gpg --homedir .gnupg --default-key 758BCC23 --detach-sign --output $(TAR_PREFIX)/$(PKGNAME).tar.bz2.gpg --armor $(TAR_PREFIX)/$(PKGNAME).tar.bz2
|
||||
|
||||
MINGWROOT = $(shell dirname $(CC))/..
|
||||
windist:
|
||||
rm -rf dist
|
||||
mkdir -p dist/lib dist/locale dist/share/themes
|
||||
for i in libatk-1.0-*.dll libbrotlicommon.dll libbrotlidec.dll libbz2-*.dll libcairo-*.dll libdatrie-*.dll libexpat-*.dll libffi-*.dll libfontconfig-*.dll libfreetype-*.dll libfribidi-*.dll libgcc_s_*.dll libgdk_pixbuf-2.0-*.dll libgdk-win32-2.0-*.dll libgio-2.0-*.dll libglib-2.0-*.dll libgmodule-2.0-*.dll libgobject-2.0-*.dll libgraphite2.dll libgtk-win32-2.0-*.dll libharfbuzz-*.dll libiconv-*.dll libintl-*.dll libpango-1.0-*.dll libpangocairo-1.0-*.dll libpangoft2-1.0-*.dll libpangowin32-1.0-*.dll libpcre-*.dll libpixman-1-*.dll libpng16-*.dll libssp-*.dll libstdc++-*.dll libthai-*.dll libwinpthread-*.dll zlib1.dll; \
|
||||
do cp -v $(MINGWROOT)/bin/$$i dist/ ; done
|
||||
cp -v dvdisaster.exe dist/
|
||||
cp -vr locale/*/ dist/locale/
|
||||
cp -vr $(MINGWROOT)/share/themes/MS-Windows dist/share/themes/
|
||||
cp -vr $(MINGWROOT)/lib/gtk-2.0 dist/lib/
|
||||
find dist -type f -name "*.a" -delete
|
||||
|
||||
windistcli:
|
||||
rm -rf dist
|
||||
mkdir -p dist/locale
|
||||
for i in libglib-2.0-*.dll libiconv-*.dll libintl-*.dll libpcre-*.dll libwinpthread-*.dll; \
|
||||
do cp -v $(MINGWROOT)/bin/$$i dist/ ; done
|
||||
cp -v dvdisaster.exe dist/
|
||||
cp -vr locale/*/ dist/locale/
|
||||
find dist -type f -name "*.a" -delete
|
||||
|
||||
static: dvdisaster
|
||||
$(CC) $(LOPTS) $(OFILES) $(LIBS) -pthread -static -o dvdisaster-static
|
||||
|
||||
Reference in New Issue
Block a user