Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
michael105 committed Feb 5, 2025
1 parent 462b347 commit 9ec76a0
Showing 1 changed file with 41 additions and 5 deletions.
46 changes: 41 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
statically linked binary for linux/64bit attached
automated package builds
draft: false
prerelease: false

Expand All @@ -46,22 +46,56 @@ jobs:
VERSION=$(sed -ne 's/^VERSION := //p' config.make | tr -d '\n')
echo "::set-output name=version::$VERSION"
- name: build package
- name: build static package
run: |
VERSION=${{ steps.get_version.outputs.version }}
echo Version - $VERSION
sed -i "s/VERSION/$VERSION/" dist/debian/DEBIAN/control
cp dist/debian/DEBIAN/control ./control.tmp
sed -i "/^Depends:/d" dist/debian/DEBIAN/control
cat dist/debian/DEBIAN/control
mkdir -p dist/debian/usr/local/bin
cp slterm_linux_amd64 dist/debian/usr/local/bin/slterm
mkdir -p dist/debian/usr/local/share/man/man1
cp src/slterm.1 dist/debian/usr/local/share/man/man1/
mkdir -p dist/debian/usr/local/share/doc/slterm
cp -R README.md LICENSE PATCHES.md doc test dist/debian/usr/local/share/doc/slterm/
dpkg-deb --build dist/debian slterm_$VERSION.deb
cp -R README.md LICENSE PATCHES.md test dist/debian/usr/local/share/doc/slterm/
mkdir dist/debian/usr/local/share/doc/slterm/doc
cp doc/* dist/debian/usr/local/share/doc/slterm/doc/
dpkg-deb --build dist/debian slterm_$VERSION_static.deb
- name: upload package
- name: upload static package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: slterm_${{ steps.get_version.outputs.version }}_static.deb
asset_name: slterm_${{ steps.get_version.outputs.version }}_static.deb
asset_content_type: application/vnd.debian.binary-package

- name: build requisites
run: sudo apt-get install libfreetype-dev x11proto-dev fontconfig libx11-dev libxft-dev python3-docutils
- name: make
run: make
- name: make check
run: make check
- name: Install project
run: |
rm dist/debian/usr/local/bin/slterm
cp ./control.tmp dist/debian/DEBIAN/control
sudo make install DESTDIR=$(pwd)/dist/debian
- name: build package
run: |
VERSION=${{ steps.get_version.outputs.version }}
cat dist/debian/DEBIAN/control
dpkg-deb --build dist/debian slterm_${{ steps.get_version.outputs.version }}.deb
- name: package check
run: |
sudo apt-get install libfreetype6 libxft2 libfontconfig1 fonts-liberation
sudo dpkg -i slterm_${{ steps.get_version.outputs.version }}.deb
slterm -V
- name: upload package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -72,3 +106,5 @@ jobs:
asset_content_type: application/vnd.debian.binary-package




0 comments on commit 9ec76a0

Please sign in to comment.