Files
ReaderForSelfoss-multiplatform/.gitea/workflows/tag.yml
aminecmi e893a29796
Some checks failed
Push/PR Steps / Lint (push) Waiting to run
Tag / createTagAndChangelog (push) Failing after 31s
Push/PR Steps / BuildAndTest (push) Has been cancelled
wip
2024-11-20 23:45:24 +01:00

40 lines
1.4 KiB
YAML

name: Tag
on:
push:
branches:
- release
jobs:
createTagAndChangelog:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Creating the tag
run: |
git fetch --tags -p
PREV=$(git describe --tags --abbrev=0)
./build.sh --publish --from-ci
- name: Generating changelog
run: |
VER=$(git describe --tags --abbrev=0)
CHANGELOG=$(git log $PREV..HEAD --pretty="- %s")
echo "**$VER**\n\n$CHANGELOG\n\n--------------------------------------------------------------------\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
git add CHANGELOG.md
git commit -m "Changelog for $VER"
git push --tags
- name: copy file via ssh password
uses: appleboy/scp-action@v0.1.7
with:
host: amine-bouabdallaoui.fr
username: ubuntu
password: ${{ secrets.PASSWORD }}
source: "version.txt"
target: "/home/ubuntu/"
- name: deploy version file
uses: appleboy/ssh-action@v1.2.0
with:
host: amine-bouabdallaoui.fr
username: ubuntu
password: ${{ secrets.PASSWORD }}
script: cd /home/ubuntu && sudo rm -rf /var/www/amine/version.txt && sudo chown www-data:www-data ./version.txt && sudo mv version.txt /var/www/amine/