mirror of
https://github.com/ekaaty/ca-certificates-brazil.git
synced 2025-12-06 01:22:38 -03:00
Compare commits
24 Commits
e82c47bd49
...
c3e7f84ea4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3e7f84ea4 | ||
|
|
7c3ac02c85 | ||
|
|
05f254ff77 | ||
|
|
9825df6a89 | ||
|
|
5cf34fb6e7 | ||
|
|
035e9bf005 | ||
|
|
8c521b1b4e | ||
|
|
c459cb1d27 | ||
|
|
7dd581bac4 | ||
|
|
9dfedbf252 | ||
|
|
62ed07d606 | ||
|
|
39f0345952 | ||
|
|
f65837bf58 | ||
|
|
57ecb92a18 | ||
|
|
6bf7f4975e | ||
|
|
8f81572cf8 | ||
|
|
05b3169a11 | ||
|
|
26517e6d95 | ||
|
|
39bf70daeb | ||
|
|
96e4941afc | ||
|
|
beecd4d0b5 | ||
|
|
d874ae75f0 | ||
|
|
a7ddba0398 | ||
|
|
55ff86f0ed |
71
.github/workflows/build-rpm.yml
vendored
Normal file
71
.github/workflows/build-rpm.yml
vendored
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
name: Build RPM Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- v[0-9]+.[0-9]+.[0-9]+
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-rpm:
|
||||||
|
name: Build and upload RPM packages
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: fedora:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: install RPM build tools
|
||||||
|
run: |
|
||||||
|
dnf -y install \
|
||||||
|
cmake \
|
||||||
|
gcc \
|
||||||
|
gcc-c++ \
|
||||||
|
git \
|
||||||
|
rpm-build \
|
||||||
|
rpmdevtools \
|
||||||
|
tar
|
||||||
|
|
||||||
|
- name: Setup RPM build tree
|
||||||
|
run: |
|
||||||
|
rpmdev-setuptree
|
||||||
|
|
||||||
|
- name: Create source tarball
|
||||||
|
run: |
|
||||||
|
cmake -B build -S .
|
||||||
|
cmake --build build --target sdist
|
||||||
|
|
||||||
|
- name: Set environment variables
|
||||||
|
run: |
|
||||||
|
echo "PKG_NAME=ca-certificates-brazil" >> $GITHUB_ENV
|
||||||
|
echo "PKG_VERSION=$(grep \
|
||||||
|
-m1 -iPo '.*CPACK_PACKAGE_VERSION [\"]*\K[\S]*[^(\"\))]' \
|
||||||
|
build/CPackConfig.cmake) \
|
||||||
|
" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Copy SOURCES and SPEC file
|
||||||
|
run: |
|
||||||
|
cp packaging/pkg.spec.in ~/rpmbuild/SPECS/${PKG_NAME}.spec
|
||||||
|
rpmdev-bumpspec -n ${PKG_VERSION} ~/rpmbuild/SPECS/${PKG_NAME}.spec
|
||||||
|
cp dist/*.src.tar.gz ~/rpmbuild/SOURCES/
|
||||||
|
|
||||||
|
- name: Build RPM
|
||||||
|
run: |
|
||||||
|
dnf -y builddep ~/rpmbuild/SPECS/ca-certificates-brazil.spec
|
||||||
|
rpmbuild -ba ~/rpmbuild/SPECS/ca-certificates-brazil.spec
|
||||||
|
|
||||||
|
- name: Upload built RPMs
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: built-rpms
|
||||||
|
path: |
|
||||||
|
~/rpmbuild/RPMS/
|
||||||
|
~/rpmbuild/SRPMS/
|
||||||
|
|
||||||
|
- name: Create GitHub Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
if: github.ref_type == 'tag'
|
||||||
|
with:
|
||||||
|
generate_release_notes: true
|
||||||
|
files: |
|
||||||
|
~/rpmbuild/RPMS/**/*.rpm
|
||||||
52
.github/workflows/ci.yml
vendored
52
.github/workflows/ci.yml
vendored
@@ -1,52 +0,0 @@
|
|||||||
name: Build and Release CI
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
schedule:
|
|
||||||
- cron: '30 3 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-ci:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
VERSION: ${{ steps.get_metadata.outputs.VERSION }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Local checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install CI dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get -y -qq install cmake g++ gcc
|
|
||||||
|
|
||||||
- name: Get latest package metadata
|
|
||||||
id: get_metadata
|
|
||||||
run: |
|
|
||||||
cmake --fresh -B build -S .
|
|
||||||
echo "TAG=v$(cat build/version)" >> $GITHUB_OUTPUT
|
|
||||||
echo "VERSION=$(cat build/version)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Check if package version has corresponding git tag
|
|
||||||
id: tagged
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git show-ref \
|
|
||||||
--tags --verify --quiet -- \
|
|
||||||
"refs/tags/${{ steps.get_metadata.outputs.TAG }}" \
|
|
||||||
&& echo tagged=1 >> $GITHUB_OUTPUT \
|
|
||||||
|| echo tagged=0 >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Create new tag
|
|
||||||
if: steps.tagged.outputs.tagged == 0
|
|
||||||
run: |
|
|
||||||
git tag ${{ steps.get_metadata.outputs.TAG }} \
|
|
||||||
&& git push origin ${{ steps.get_metadata.outputs.TAG }} \
|
|
||||||
|| exit 0
|
|
||||||
|
|
||||||
build-fedora:
|
|
||||||
needs: release-ci
|
|
||||||
uses: ./.github/workflows/fedora.yml
|
|
||||||
with:
|
|
||||||
containers: "['fedora:latest', 'fedora:41']"
|
|
||||||
version: ${{ needs.release-ci.outputs.VERSION }}
|
|
||||||
79
.github/workflows/fedora.yml
vendored
79
.github/workflows/fedora.yml
vendored
@@ -1,79 +0,0 @@
|
|||||||
#name: build-rpm
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
containers:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
version:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
strategy:
|
|
||||||
max-parallel: 2
|
|
||||||
matrix:
|
|
||||||
image: ${{ fromJson(inputs.containers) }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: ${{ matrix.image }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Local checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: install RPM build dependencies
|
|
||||||
run: |
|
|
||||||
dnf -y install \
|
|
||||||
cmake \
|
|
||||||
gcc \
|
|
||||||
gcc-c++ \
|
|
||||||
git \
|
|
||||||
rpm-build \
|
|
||||||
rpmdevtools \
|
|
||||||
tar
|
|
||||||
|
|
||||||
- name: Setup RPM build tree
|
|
||||||
run: |
|
|
||||||
rpmdev-setuptree
|
|
||||||
|
|
||||||
- name: Create source tarball
|
|
||||||
run: |
|
|
||||||
cmake --fresh -B build -S .
|
|
||||||
cmake --build build --target sdist
|
|
||||||
|
|
||||||
- name: Set environment variables
|
|
||||||
run: |
|
|
||||||
echo "PKG_VERSION=$(cat build/version)" >> $GITHUB_ENV
|
|
||||||
echo "PKG_NAME=$(grep -Po 'Name:\ *\K[\S ]*' \
|
|
||||||
packaging/pkg.spec.in)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Copy SOURCES and SPEC file
|
|
||||||
run: |
|
|
||||||
cp packaging/pkg.spec.in ~/rpmbuild/SPECS/${PKG_NAME}.spec
|
|
||||||
rpmdev-bumpspec -n ${PKG_VERSION} ~/rpmbuild/SPECS/${PKG_NAME}.spec
|
|
||||||
cp dist/*.src.tar.gz ~/rpmbuild/SOURCES/
|
|
||||||
|
|
||||||
- name: Build RPM packages
|
|
||||||
run: |
|
|
||||||
dnf -y builddep ~/rpmbuild/SPECS/${PKG_NAME}.spec
|
|
||||||
rpmbuild -ba ~/rpmbuild/SPECS/${PKG_NAME}.spec
|
|
||||||
|
|
||||||
- name: Check if package version has corresponding git tag
|
|
||||||
id: tagged
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git show-ref \
|
|
||||||
--tags --verify --quiet -- \
|
|
||||||
"refs/tags/${NEW_TAG}" \
|
|
||||||
&& echo tagged=1 >> $GITHUB_OUTPUT \
|
|
||||||
|| echo tagged=0 >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Create GitHub Release
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
if: github.ref_type == 'tag' && steps.tagged.output.tagged == 1
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
~/rpmbuild/RPMS/*/*.rpm
|
|
||||||
~/rpmbuild/SRPMS/*.rpm
|
|
||||||
@@ -15,11 +15,6 @@ execute_process(
|
|||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_process(
|
|
||||||
COMMAND echo ${PROJECT_VERSION}
|
|
||||||
OUTPUT_FILE ${CMAKE_BINARY_DIR}/version
|
|
||||||
)
|
|
||||||
|
|
||||||
set(SourceFiles
|
set(SourceFiles
|
||||||
"${CMAKE_SOURCE_DIR}/cmake"
|
"${CMAKE_SOURCE_DIR}/cmake"
|
||||||
"${CMAKE_SOURCE_DIR}/CMakeLists.txt"
|
"${CMAKE_SOURCE_DIR}/CMakeLists.txt"
|
||||||
|
|||||||
Reference in New Issue
Block a user