add rpm spec
This commit is contained in:
parent
75c89c39ec
commit
d6c2679416
@ -11,8 +11,31 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
container:
|
||||
image: fedora:latest
|
||||
env:
|
||||
GOPATH: /
|
||||
SSH_AUTH_SOCK: /tmp/ssh.sock
|
||||
ENVIRONMENT: dev
|
||||
volumes:
|
||||
- "/etc/timezone:/etc/timezone:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "/etc/gitconfig:/etc/gitconfig:ro"
|
||||
- "/${{ env.SSH_AUTH_SOCK }}:/tmp/ssh.sock"
|
||||
- "/opt/gitea/act_runner/.ssh/known_hosts:/root/.ssh/known_hosts"
|
||||
- "/opt/gitea/act_runner/.gitconfig:/root/.gitconfig:ro"
|
||||
- "/opt/gitea/act_runner/.git-credentials:/root/.git-credentials:ro"
|
||||
- "/etc/ssl/certs:/etc/ssl/certs:ro"
|
||||
options: --cpus 10
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
|
||||
- run: dnf install -y dnf-plugins-core
|
||||
- run: dnf builddep build/jx.spec
|
||||
- run: make rpm
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "jx"
|
||||
artifacts:
|
||||
- "jx"
|
||||
- "/root/rpmbuild/SRPMS/jx-${{ env.VERSION }}-1.fc40.src.rpm"
|
||||
- "/root/rpmbuild/RPMS/x86_64/jx-${{ env.VERSION }}-1.fc40.x86_64.rpm"
|
||||
|
3
Makefile
3
Makefile
@ -11,3 +11,6 @@ jx-cli:
|
||||
test: jx-cli
|
||||
go test -coverprofile=artifacts/coverage.profile ./...
|
||||
go tool cover -html=artifacts/coverage.profile -o artifacts/code-coverage.html
|
||||
|
||||
rpm:
|
||||
rpmbuild -ba build/jx.spec
|
||||
|
42
build/jx.spec
Normal file
42
build/jx.spec
Normal file
@ -0,0 +1,42 @@
|
||||
Name: jx
|
||||
Version: 0.2.2
|
||||
Release: %{!?rel:1}%{?dist}
|
||||
Summary: Provision resources using a declarative YAML syntax.
|
||||
|
||||
License: https://gitea.rosskeen.house/doublejynx/jx/src/branch/main/LICENSE
|
||||
URL: https://gitea.rosskeen.house/doublejynx/jx/
|
||||
Source0: https://gitea.rosskeen.house/doublejynx/jx/archive/v0.2.2.tar.gz
|
||||
|
||||
BuildRequires: luajit-devel
|
||||
BuildRequires: make
|
||||
BuildRequires: golang >= 1.22.1
|
||||
Requires: luajit
|
||||
|
||||
%description
|
||||
|
||||
%global debug_package %{nil}
|
||||
%undefine _missing_build_ids_terminate_build
|
||||
%global _missing_build_ids_terminate_build 0
|
||||
|
||||
%prep
|
||||
%autosetup -n jx
|
||||
|
||||
|
||||
%build
|
||||
LDFLAGS=
|
||||
%make_build
|
||||
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}/usr/bin
|
||||
cp jx %{buildroot}/usr/bin/jx
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
#%doc add-docs-here
|
||||
%{_bindir}/jx
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun May 26 2024 Matthew Rich <matthewrich.conf@gmail.com> v0.2.2
|
||||
-
|
Loading…
Reference in New Issue
Block a user