mirror of
https://github.com/javalsai/lidm.git
synced 2025-07-05 15:28:42 +02:00
99 lines
2.9 KiB
YAML
99 lines
2.9 KiB
YAML
name: Make Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
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"
|
|
|
|
|
|
check:
|
|
name: Check
|
|
needs: release-checks
|
|
uses: ./.github/workflows/check.yml
|
|
permissions: write-all
|
|
|
|
build:
|
|
name: Build
|
|
needs: release-checks
|
|
uses: ./.github/workflows/build.yml
|
|
permissions: write-all
|
|
|
|
release:
|
|
name: Make Release v${{ needs.release-checks.outputs.VERSION }}
|
|
runs-on: ubuntu-24.04
|
|
permissions: write-all
|
|
needs: [ release-checks, check, build ]
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
path: builds
|
|
pattern: build-*
|
|
merge-multiple: true
|
|
|
|
- uses: ncipollo/release-action@v1
|
|
with:
|
|
tag: v${{ needs.release-checks.outputs.VERSION }}
|
|
commit: ${{ github.sha }}
|
|
artifacts: builds/lidm-*
|
|
artifactErrorsFailBuild: true
|
|
body: Release notes not generated yet.
|
|
|
|
aur-update:
|
|
name: Update AUR pkgs
|
|
runs-on: ubuntu-24.04
|
|
container: archlinux:latest
|
|
permissions: write-all
|
|
needs: [ release-checks, release ]
|
|
steps:
|
|
- run: pacman -Sy --noconfirm git github-cli base-devel pacman-contrib
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: |
|
|
chage -E -1 nobody
|
|
passwd -u nobody
|
|
|
|
cd "assets/pkg/aur"
|
|
chown nobody:nobody . -R
|
|
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
|
|
chown $UID:$(id -g) . -R
|
|
|
|
- run: |
|
|
BRANCH=actions/update-aur-${{ needs.release-checks.outputs.VERSION }}
|
|
git config --global --add safe.directory $GITHUB_WORKSPACE
|
|
git config user.name "GitHub Actions"
|
|
git config user.email "actions@github.com"
|
|
git checkout -b $BRANCH
|
|
git commit -am "Update AUR pkgs to v${{ needs.release-checks.outputs.VERSION }}"
|
|
git push -u origin $BRANCH
|
|
gh pr create --head $BRANCH \
|
|
--title "[AUR update]: Bump to ${{ needs.release-checks.outputs.VERSION }}" \
|
|
--body "*This PR was created automatically*"
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|