diff --git a/.github/workflows/build-flatpost-f41.yml b/.github/workflows/build-flatpost-f41.yml index 5e0403a..f7a771a 100644 --- a/.github/workflows/build-flatpost-f41.yml +++ b/.github/workflows/build-flatpost-f41.yml @@ -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 diff --git a/.github/workflows/build-flatpost-version.yml b/.github/workflows/build-flatpost-version.yml new file mode 100644 index 0000000..952188a --- /dev/null +++ b/.github/workflows/build-flatpost-version.yml @@ -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 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..9b47e7b --- /dev/null +++ b/.github/workflows/build.yml @@ -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 }} +