mirror of
https://github.com/javalsai/lidm.git
synced 2025-07-05 15:28:42 +02:00
ci: update make release action
This commit is contained in:
parent
f3ae85bb94
commit
3d6efa448b
42
.github/workflows/make-release.yml
vendored
42
.github/workflows/make-release.yml
vendored
@ -2,23 +2,45 @@ name: Check and Build Release
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
version:
|
|
||||||
required: true
|
|
||||||
default: ''
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
release-checks:
|
||||||
|
name: Release Checks
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
permissions: write-all
|
||||||
|
outputs:
|
||||||
|
VERSION: ${{ steps.check-ver-changed.outputs.VERSION }}
|
||||||
|
steps:
|
||||||
|
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||||
|
with:
|
||||||
|
packages: "git"
|
||||||
|
version: 1.0
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check Version Changed
|
||||||
|
id: check-ver-changed
|
||||||
|
run: |
|
||||||
|
GIT_TAG=$(git describe --no-long --abbrev=0 --tags --always)
|
||||||
|
MAKE_TAG=$(make print-version)
|
||||||
|
|
||||||
|
if [[ "$GIT_TAG" == "v$MAKE_TAG" ]]; then
|
||||||
|
echo "ERR: Git tag matches makefile, did you bump Makefile up?" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "VERSION=$MAKE_TAG" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Check and Build
|
name: Check and Build
|
||||||
|
needs: release-checks
|
||||||
uses: ./.github/workflows/check-and-build.yml
|
uses: ./.github/workflows/check-and-build.yml
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Make Release v${{ inputs.version }}
|
name: Make Release v${{ needs.release-checks.outputs.VERSION }}
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: build
|
needs: [ release-checks, build ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@ -28,7 +50,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: ncipollo/release-action@v1
|
- uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
tag: v${{ inputs.version }}
|
tag: v${{ needs.release-checks.outputs.VERSION }}
|
||||||
commit: ${{ github.sha }}
|
commit: ${{ github.sha }}
|
||||||
artifacts: builds/lidm-*
|
artifacts: builds/lidm-*
|
||||||
artifactErrorsFailBuild: true
|
artifactErrorsFailBuild: true
|
||||||
@ -39,7 +61,7 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
container: archlinux:latest
|
container: archlinux:latest
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: release
|
needs: [ release-checks, release ]
|
||||||
steps:
|
steps:
|
||||||
- run: pacman -Sy --noconfirm git github-cli base-devel pacman-contrib
|
- run: pacman -Sy --noconfirm git github-cli base-devel pacman-contrib
|
||||||
|
|
||||||
@ -51,7 +73,7 @@ jobs:
|
|||||||
|
|
||||||
cd "assets/pkg/aur"
|
cd "assets/pkg/aur"
|
||||||
chown nobody:nobody . -R
|
chown nobody:nobody . -R
|
||||||
su - -s /bin/bash nobody -c "$PWD/update-pkgs.sh ${{ inputs.version }}"
|
su - -s /bin/bash nobody -c "$PWD/update-pkgs.sh ${{ needs.release-checks.outputs.VERSION }}"
|
||||||
su - -s /bin/bash nobody -c "$PWD/test-makepkg.sh" # This will also update -git pkgver
|
su - -s /bin/bash nobody -c "$PWD/test-makepkg.sh" # This will also update -git pkgver
|
||||||
chown $UID:$(id -g) . -R
|
chown $UID:$(id -g) . -R
|
||||||
|
|
||||||
|
8
Makefile
8
Makefile
@ -1,4 +1,4 @@
|
|||||||
VERSION = 1.1.1
|
VERSION = 1.2.0
|
||||||
.DEFAULT_GOAL := lidm
|
.DEFAULT_GOAL := lidm
|
||||||
|
|
||||||
CDIR=src
|
CDIR=src
|
||||||
@ -91,6 +91,9 @@ pre-commit:
|
|||||||
clang-format -i $$(git ls-files "*.c" "*.h")
|
clang-format -i $$(git ls-files "*.c" "*.h")
|
||||||
clang-tidy -p . $$(git ls-files "*.c" "*.h")
|
clang-tidy -p . $$(git ls-files "*.c" "*.h")
|
||||||
|
|
||||||
|
print-version:
|
||||||
|
@echo $(VERSION)
|
||||||
|
|
||||||
.PHONY: clean \
|
.PHONY: clean \
|
||||||
install uninstall \
|
install uninstall \
|
||||||
install-service \
|
install-service \
|
||||||
@ -99,4 +102,5 @@ pre-commit:
|
|||||||
install-service-runit \
|
install-service-runit \
|
||||||
install-service-openrc \
|
install-service-openrc \
|
||||||
install-service-systemd \
|
install-service-systemd \
|
||||||
pre-commit
|
pre-commit \
|
||||||
|
print-version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user