Skip to content

Merge pull request #261 from Bali10050/feature #19

Merge pull request #261 from Bali10050/feature

Merge pull request #261 from Bali10050/feature #19

Workflow file for this run

# Build Darkly and publish release
name: Darkly build & release
on:
push:
tags:
- "v*"
env:
BUILD_REPO: https://github.com/Bali10050/Darkly
jobs:
release-ci:
runs-on: ubuntu-24.04
outputs:
VERSION: ${{ steps.step_getlatest_tag.outputs.VERSION }}
ASSET: ${{ steps.step_get_asset.outputs.ASSET }}
steps:
- name: Checkout local
uses: actions/checkout@v4.2.0
with:
repository: ${{ github.repository }}
sparse-checkout: |
.github/workflows
- name: Install build dependencies
run: sudo apt-get install git -y -qq
- name: Get latest Darkly release tag
id: step_getlatest_tag
run: |
# get latest release tag from remote
latest_tag=$(git -c 'versionsort.suffix=-' ls-remote --exit-code --refs --sort='version:refname' --tags $BUILD_REPO '*.*' \
| tail --lines=1 | cut --delimiter='/' --fields=3)
echo "INFO: Latest tag = $latest_tag"
test ! -z "$latest_tag" && echo "LATEST_TAG=$latest_tag" >> "$GITHUB_ENV" \
|| echo "ERROR: Latest tag not found" || exit 1
# use the tag name but remove the 'v' for the asset name to publish
tagname=$(echo $latest_tag | sed 's/v//')
echo "VERSION=$tagname" >> "$GITHUB_OUTPUT"
- name: Download tag asset
id: step_get_asset
run: |
curl -L $BUILD_REPO/archive/refs/tags/${{ env.LATEST_TAG }}.tar.gz --output darkly-${{ env.LATEST_TAG }}.tar.gz
echo "ASSET=darkly-${{ env.LATEST_TAG }}.tar.gz" >> "$GITHUB_OUTPUT"
- uses: actions/cache/save@v4
id: cache
with:
path: ${{ steps.step_get_asset.outputs.ASSET }}
key: ${{ runner.os }}-v${{ steps.step_getlatest_tag.outputs.VERSION }}-${{ hashFiles(steps.step_get_asset.outputs.ASSET) }}
- name: Save version
run: echo ${{ steps.step_get_artifact.outputs.VERSION }} > VERSION
- name: Upload version
uses: actions/upload-artifact@v5
with:
name: VERSION
path: VERSION
retention-days: 1
Debian:
needs: release-ci
uses: ./.github/workflows/debian14.yml
with:
cache-file-path: ${{ needs.release-ci.outputs.ASSET }}
version: ${{ needs.release-ci.outputs.VERSION }}
# Kubuntu:
# needs: release-ci
# uses: ./.github/workflows/kubuntu.yml
# with:
# cache-file-path: ${{ needs.release-ci.outputs.ASSET }}
# version: ${{ needs.release-ci.outputs.VERSION }}
openSUSE-Tumbleweed:
needs: release-ci
uses: ./.github/workflows/opensuse-tw.yml
with:
cache-file-path: ${{ needs.release-ci.outputs.ASSET }}
version: ${{ needs.release-ci.outputs.VERSION }}
KDE-Neon:
needs: release-ci
uses: ./.github/workflows/neon.yml
with:
cache-file-path: ${{ needs.release-ci.outputs.ASSET }}
version: ${{ needs.release-ci.outputs.VERSION }}
Fedora:
needs: release-ci
uses: ./.github/workflows/fedora.yml
with:
cache-file-path: ${{ needs.release-ci.outputs.ASSET }}
version: ${{ needs.release-ci.outputs.VERSION }}
containers: "['fedora:42','fedora:43']"
Archlinux:
needs: release-ci
uses: ./.github/workflows/archlinux.yml
with:
version: ${{ needs.release-ci.outputs.VERSION }}
Flatpak:
needs: release-ci
uses: ./.github/workflows/flatpak.yml
with:
cache-file-path: ${{ needs.release-ci.outputs.ASSET }}
version: ${{ needs.release-ci.outputs.VERSION }}
release:
uses: ./.github/workflows/release.yml
needs:
[
"archlinux",
"fedora",
"opensuse-tumbleweed",
"kde-neon",
"debian",
"flatpak",
]