2024-09-26 20:35:09 +03:00
|
|
|
name: create archive with lfs
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tag:
|
|
|
|
runs-on: native
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
2024-09-26 20:55:37 +03:00
|
|
|
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
|
2024-09-26 21:05:15 +03:00
|
|
|
git lfs install --local
|
2024-09-26 20:57:28 +03:00
|
|
|
git lfs fetch origin refs/tags/${{ gitea.ref_name }}
|
2024-09-26 20:55:37 +03:00
|
|
|
git lfs checkout
|
2024-09-26 21:23:50 +03:00
|
|
|
- run: GZIP=-9 tar --exclude='./.git' -czvf ../source.tgz --directory=. .
|
2024-09-26 21:21:05 +03:00
|
|
|
- run: du -sh ../source.tgz
|
2024-09-26 20:38:02 +03:00
|
|
|
- uses: https://gitea.com/actions/gitea-release-action@v1
|
2024-09-26 20:35:09 +03:00
|
|
|
with:
|
|
|
|
files: |-
|
2024-09-26 21:18:06 +03:00
|
|
|
../source.tgz
|