Rename ares -> ci #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright (C) The c-ci project and its contributors | |
| # SPDX-License-Identifier: MIT | |
| name: Build Release Package | |
| on: | |
| push: | |
| concurrency: | |
| group: ${{ github.ref }}-build-release-package | |
| cancel-in-progress: true | |
| env: | |
| TEST_FILTER: "--gtest_filter=-*LiveSearchTXT*:*LiveSearchANY*" | |
| MAKE: make | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| discussions: write | |
| outputs: | |
| hashes: ${{ steps.hash.outputs.hashes }} | |
| version: ${{ steps.version.outputs.version }} | |
| name: "build" | |
| steps: | |
| - name: Install packages | |
| uses: awalsh128/cache-apt-pkgs-action@latest | |
| with: | |
| packages: autoconf automake libtool g++ libgmock-dev pkg-config gdb | |
| version: 1.0 | |
| - name: Checkout c-ci | |
| uses: actions/checkout@v4 | |
| - name: Get Tag version | |
| id: version | |
| run: | | |
| version=`echo ${GITHUB_REF} | grep '^refs/tags/v' | sed -e 's|^refs/tags/v\(.*\)|\1|'` | |
| if [ "$version" = "" ] ; then | |
| version="prerelease" | |
| fi | |
| echo "version=${version}" >> "$GITHUB_OUTPUT" | |
| - name: "build c-ci tarball" | |
| run: | | |
| autoreconf -fi | |
| ./configure | |
| make dist | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "c-ci-src-tarball" | |
| path: 'c-ci-*.tar.gz' | |
| if-no-files-found: error | |
| overwrite: true | |
| retention-days: 7 | |
| - name: Upload Release | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| body_path: RELEASE-NOTES.md | |
| draft: true | |
| make_latest: true | |
| name: ${{ steps.version.outputs.version }} | |
| files: c-ci-${{ steps.version.outputs.version }}.tar.gz | |
| fail_on_unmatched_files: true | |
| discussion_category_name: "Announcements" | |
| - name: Generate subject | |
| id: hash | |
| run: | | |
| set -euo pipefail | |
| echo "hashes=$(sha256sum c-ci-*.tar.gz | base64 -w0)" >> "$GITHUB_OUTPUT" | |
| provenance: | |
| needs: [build] | |
| permissions: | |
| actions: read # To read the workflow path. | |
| id-token: write # To sign the provenance. | |
| contents: write # To add assets to a release. | |
| uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | |
| with: | |
| base64-subjects: "${{ needs.build.outputs.hashes }}" | |
| upload-assets: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| provenance-name: "c-ci-${{ needs.build.outputs.version }}.intoto.jsonl" |