Skip to content

Commit

Permalink
feat(workflows): build debian packages for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
devnote-dev committed Oct 5, 2024
1 parent 36e43b0 commit a82104a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,31 @@ jobs:
crystal build src/main.cr --debug -o crimson
tar -zcf crimson-nightly-linux-x86_64.tar.gz crimson
- name: Build Debian Package
run: |
RNAME=crimson_nightly-1_amd64
mkdir -p build/$RNAME/DEBIAN build/$RNAME/usr/bin
echo "Package: crimson
Version: nightly
Maintainer: Devaune Whittle <https://github.com/devnote-dev>
Architecture: amd64
Homepage: https://github.com/crimson-crystal/crimson
Description: A Crystal Version Manager
" > build/$RNAME/DEBIAN/control
mv crimson build/$RNAME/usr/bin
dpkg --build build/$RNAME
mv build/$RNAME/usr/bin/crimson .
mv build/$RNAME.deb .
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: crimson-linux
path: |
crimson
crimson_nightly-1_amd64.deb
crimson-nightly-linux-x86_64.tar.gz
windows:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,31 @@ jobs:
crystal build src/main.cr --no-debug --release -o crimson
tar -zcf crimson-${{ github.ref_name }}-linux-x86_64.tar.gz crimson
- name: Build Debian Package
run: |
RNAME=crimson_${{ github.ref_name }}-1_amd64
mkdir -p build/$RNAME/DEBIAN build/$RNAME/usr/bin
echo "Package: crimson
Version: ${{ github.ref_name }}
Maintainer: Devaune Whittle <https://github.com/devnote-dev>
Architecture: amd64
Homepage: https://github.com/crimson-crystal/crimson
Description: A Crystal Version Manager
" > build/$RNAME/DEBIAN/control
mv crimson build/$RNAME/usr/bin
dpkg --build build/$RNAME
mv build/$RNAME/usr/bin/crimson .
mv build/$RNAME.deb .
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: crimson-linux
path: |
crimson
crimson_${{ github.ref_name }}-1_amd64.deb
crimson-${{ github.ref_name }}-linux-x86_64.tar.gz
windows:
Expand Down

0 comments on commit a82104a

Please sign in to comment.