add more missing workflows bits

This commit is contained in:
GloriousEggroll 2025-04-13 22:26:59 -06:00
parent d1deecb739
commit dfaa969b2b
3 changed files with 57 additions and 1 deletions

View file

@ -68,7 +68,7 @@ jobs:
mv ~/rpmbuild/RPMS/x86_64/flatpost-${{ env.VERSION }}*.rpm \
~/rpmbuild/RPMS/x86_64/flatpost-${{ env.VERSION }}.fc41.rpm
- name: Fedora-40
- name: Fedora-41
uses: actions/upload-artifact@v4
with:
name: flatpost-${{ env.VERSION }}.fc41.rpm

View file

@ -0,0 +1,35 @@
name: Flatpost Describe Version
on:
workflow_call:
outputs:
version:
value: "${{ jobs.version.outputs.tag_abbrev }}.${{ jobs.version.outputs.tag_offset }}"
branch:
value: "${{ jobs.version.outputs.branch }}"
jobs:
version:
name: Version
runs-on: ubuntu-latest
outputs:
tag_abbrev: ${{ steps.describe.outputs.tag_abbrev }}
tag_offset: ${{ steps.describe.outputs.tag_offset }}
sha_short: ${{ steps.describe.outputs.sha_short }}
full_desc: ${{ steps.describe.outputs.full_desc }}
branch: ${{ steps.describe.outputs.branch }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Describe
id: describe
shell: bash
run: |
tag_abbrev=$(git tag --sort=v:refname | grep -oE "(^[0-9]+\.[0-9]+(.[0-9]+)?)$" | tail -1)
echo "tag_abbrev=$tag_abbrev" >> $GITHUB_OUTPUT
echo "tag_offset=$(git rev-list $tag_abbrev..HEAD --count)" >> $GITHUB_OUTPUT
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "full_desc=$(git describe --long --tags)" >> $GITHUB_OUTPUT
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT

21
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,21 @@
name: Build and upload development artifacts
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
version:
name: Describe
uses: ./.github/workflows/build-flatpost-version.yml
fedora41-build:
name: Fedora 41 Build
uses: ./.github/workflows/build-flatpost-f41.yml
needs: version
with:
version: ${{ needs.version.outputs.version }}
shasum: ${{ github.sha }}