Compare commits
4 Commits
9af24d49ee
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ee650f2b71 | |||
| a5ddc33a27 | |||
| a9c87f2adf | |||
| 5692f4bb08 |
45
.gitea/workflows/version.yml
Normal file
45
.gitea/workflows/version.yml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: version
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-version:
|
||||||
|
runs-on: [ubuntu-24.04]
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
rm -rf .git || true
|
||||||
|
rm -rf ./* ./.??* || true
|
||||||
|
git clone --depth 1 https://git.knoxmakers.org/KnoxMakers/knoxmakers-inkscape.git .
|
||||||
|
git checkout main
|
||||||
|
|
||||||
|
- name: Configure git identity
|
||||||
|
run: |
|
||||||
|
git config user.name "haxbot"
|
||||||
|
git config user.email "haxbot@knoxmakers.sh"
|
||||||
|
|
||||||
|
- name: Write version file
|
||||||
|
run: |
|
||||||
|
echo "${{ gitea.event.release.name }}" > version
|
||||||
|
|
||||||
|
- name: Commit and push version file
|
||||||
|
env:
|
||||||
|
HAXBOT_TOKEN: ${{ secrets.HAXBOT_TOKEN }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
git add version
|
||||||
|
|
||||||
|
if git diff --cached --quiet; then
|
||||||
|
echo "No changes to version file"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
git commit -m "version: ${{ gitea.event.release.name }}"
|
||||||
|
|
||||||
|
REPO_URL="https://x-access-token:${HAXBOT_TOKEN}@git.knoxmakers.org/KnoxMakers/knoxmakers-inkscape.git"
|
||||||
|
git remote set-url origin "$REPO_URL"
|
||||||
|
git push origin HEAD:main
|
||||||
Reference in New Issue
Block a user