Skip to content
name: Attach CI-built termux-elf-cleaner to release
on:
release:
types:
- published
jobs:
attach-program:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.TERMUXBOT2_TOKEN }}
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
ref: ${{ env.GITHUB_REF }}
- name: Check version
run: |
RELEASE_VERSION_NAME="${GITHUB_REF/refs\/tags\//}"
if ! printf "%s" "${RELEASE_VERSION_NAME/v/}" | grep -qP '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'; then
echo "The versionName '${RELEASE_VERSION_NAME/v/}' is not a valid version as per semantic version '2.0.0' spec in the format 'major.minor.patch(-prerelease)(+buildmetadata)'. https://semver.org/spec/v2.0.0.html."
exit 1
fi
- name: Build
run: |
autoreconf -vfi
mkdir build && cd build
../configure
make
- name: Attach termux-elf-cleaner to release
run: >-
hub release edit
-m ""
-a "./build/termux-elf-cleaner"
"${GITHUB_REF/refs\/tags\//}"