Skip to content

Commit

Permalink
update release
Browse files Browse the repository at this point in the history
  • Loading branch information
doziestar committed Jun 24, 2024
1 parent 470910e commit af24625
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ jobs:
asset_path: ./server_forge-x86_64-unknown-linux-gnu.tar.gz
asset_name: server_forge-x86_64-unknown-linux-gnu.tar.gz
asset_content_type: application/gzip
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: server_forge-x86_64-unknown-linux-gnu
path: server_forge-x86_64-unknown-linux-gnu.tar.gz

publish-crates-io:
name: Publish to crates.io
Expand All @@ -143,13 +148,20 @@ jobs:

linux-packages:
name: Create Linux Packages
needs: [release]
needs: [ release ]
if: github.event_name == 'release' && github.event.action == 'created'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y rpm
- name: Download release artifact
uses: actions/download-artifact@v3
with:
name: server_forge-x86_64-unknown-linux-gnu
path: ./
- name: Extract release artifact
run: tar -xzvf server_forge-x86_64-unknown-linux-gnu.tar.gz
- name: Create DEB package
run: |
mkdir -p serverforge_${{ github.ref_name }}_amd64/DEBIAN
Expand All @@ -159,12 +171,12 @@ jobs:
Maintainer: Chidozie C. Okafor <chidosiky2015@gmail.com>
Description: ServerForge - A robust server setup and maintenance tool" > serverforge_${{ github.ref_name }}_amd64/DEBIAN/control
mkdir -p serverforge_${{ github.ref_name }}_amd64/usr/local/bin
cp target/x86_64-unknown-linux-gnu/release/server_forge serverforge_${{ github.ref_name }}_amd64/usr/local/bin/
cp server_forge serverforge_${{ github.ref_name }}_amd64/usr/local/bin/
dpkg-deb --build serverforge_${{ github.ref_name }}_amd64
- name: Create RPM package
run: |
mkdir -p ~/rpmbuild/{SPECS,SOURCES,BUILD,RPMS,SRPMS}
cp target/x86_64-unknown-linux-gnu/release/server_forge ~/rpmbuild/SOURCES/
cp server_forge ~/rpmbuild/SOURCES/
echo "Name: serverforge
Version: ${{ github.ref_name }}
Release: 1
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
name = "serverforge"
version = "0.1.0"
edition = "2021"
authors = ["Chidozie C. Okafor <chidosiky2015@gmail.com>"]
description = "ServerForge - A robust server setup and maintenance tool"
license = "MIT"

[dependencies]
log = "0.4.21"
Expand Down

0 comments on commit af24625

Please sign in to comment.