Add VERSION to DESCRIPTION automatically #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Autoreconf Mirror Branch | ||
on: | ||
push: | ||
branches: [ main ] | ||
jobs: | ||
autoreconf: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Dev Branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: 'dev' | ||
- name: Set up Autotools | ||
run: sudo apt-get update && sudo apt-get install -y autoconf automake libtool sed | ||
- name: Run autoreconf | ||
run: autoreconf -i | ||
- name: Substitute VERSION into DESCRIPTION | ||
run: | | ||
VERSION=$(cat VERSION) | ||
sed "s/@VERSION@/$VERSION/g" DESCRIPTION.in > DESCRIPTION | ||
- name: Push to Main Branch | ||
run: | | ||
git config --global user.name 'GitHub Action' | ||
git config --global user.email 'action@github.com' | ||
git add -A | ||
git commit -m "Auto-update Autotools files" || echo "No changes to commit" | ||
git push origin HEAD:main -f |