website/.gitea/workflows/create-archive.yml
dusk 533ff6c7d8
All checks were successful
create archive with lfs / tag (push) Successful in 25s
ci: use xz attempt 2
2024-09-26 21:30:52 +03:00

30 lines
876 B
YAML

name: create archive with lfs
on:
push:
tags:
- '*'
jobs:
tag:
runs-on: native
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
lfs: false
- name: Checkout LFS
run: |
function EscapeForwardSlash() { echo "$1" | sed 's/\//\\\//g'; }
readonly ReplaceStr="EscapeForwardSlash ${{ gitea.repository }}.git/info/lfs/objects/batch"; sed -i "s/\(\[http\)\( \".*\)\"\]/\1\2`$ReplaceStr`\"]/" .git/config
git config --local lfs.transfer.maxretries 1
git lfs install --local
git lfs fetch origin refs/tags/${{ gitea.ref_name }}
git lfs checkout
- run: XZ_OPT=-9 tar --exclude='./.git' -cvJf ../source.txz --directory=. .
- run: du -sh ../source.txz
- uses: https://gitea.com/actions/gitea-release-action@v1
with:
files: |-
../source.txz