Skip to content

release

release #24

Workflow file for this run

name: Create Release
on:
# push:
# tags:
# - '*'
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
release:

Check failure on line 14 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 14
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download Binary using wget
run: |
wget https://github.com/michael105/static-bin/raw/refs/heads/main/xorg/slterm
chmod a+x slterm
mv slterm slterm_linux_amd64
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
automated package builds
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./slterm_linux_amd64
asset_name: slterm_linux_amd64
asset_content_type: application/octet-stream
- name: Get version from config.make
id: get_version
run: |
VERSION=$(sed -ne 's/^VERSION := //p' config.make | tr -d '\n')
echo "::set-output name=version::$VERSION"
- 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 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 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 }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: slterm_${{ steps.get_version.outputs.version }}.deb
asset_name: slterm_${{ steps.get_version.outputs.version }}.deb
asset_content_type: application/vnd.debian.binary-package
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Download Binary using wget
# run: |
# wget https://github.com/michael105/static-bin/raw/refs/heads/main/xorg/slterm
# chmod a+x slterm
# mv slterm slterm_linux_amd64