Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new workflow for building .deb packages and the checksum for Debian-based GNU/Linux distros #36

Merged
merged 2 commits into from
Oct 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/deb-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build .deb package and create checksum

on:
push:
tags:
- 'v*.*.*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Build binaries
run: go build -v ./... && go build -v cmd/gls.go

- name: Prepare directories for .deb packaging
run: |
mkdir gls-deb
mkdir -p gls-deb/usr/local/bin
cp gls gls-deb/usr/local/bin

- name: Build .deb package
uses: jiro4989/build-deb-action@v2
with:
package: gls
package_root: gls-deb
maintainer: Ozan Sazak <[email protected]>
version: ${{ github.ref }} # refs/tags/v*.*.*
arch: 'amd64'
desc: 'minimal file manager with terminal UI #Go'

- name: Checksum of package
run: |
sha256sum gls_*.deb > $(ls gls_*.deb).sha256sum
echo gls_*.deb.sha256sum

- name: Release
uses: softprops/[email protected]
with:
files: |
*.deb*