Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
michael105 committed Feb 1, 2025
1 parent 8a7932b commit 91f1fec
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@ name: Create Release with Binary

on:
push:
branches: [ "master" ]
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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: Download Binary using wget
run: |
Expand All @@ -27,8 +23,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.version }}
release_name: Release ${{ steps.get_version.outputs.version }} testing
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
statically linked binary for linux/64bit attached
draft: false
Expand All @@ -44,4 +40,27 @@ jobs:
asset_name: slterm_linux_amd64
asset_content_type: application/octet-stream

- name: build package
run: |
VERSION=${{ github.ref }}
sed -i "s/VERSION/$VERSION/;/^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
- 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_${{ github.ref }}.deb
asset_name: slterm_${{ github.ref }}.deb
asset_content_type: application/vnd.debian.binary-package


0 comments on commit 91f1fec

Please sign in to comment.