feat: WIP

This commit is contained in:
Nikita Kiselev
2025-07-10 18:31:02 +03:00
parent c3664025ba
commit 846fa64fb4
68 changed files with 4144 additions and 118 deletions

61
.github/workflows/main.yaml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: Telegram Mini App Shop Builder
on:
push:
branches:
- master
permissions:
contents: write
jobs:
module-build:
if: github.ref == 'refs/heads/master'
name: Build module.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build module
run: |
bash scripts/ci/build.sh "${GITHUB_WORKSPACE}"
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: oc_telegram_shop.ocmod.zip
path: ./build/oc_telegram_shop.ocmod.zip
retention-days: 1
release:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: [module-build]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # to fetch tags
- name: Extract tag and set filename
id: meta
run: |
TAG=${GITHUB_REF#refs/tags/}
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "filename=oc_telegram_shop_${TAG}.ocmod.zip" >> $GITHUB_OUTPUT
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: oc_telegram_shop.ocmod.zip
path: ./build
- name: Rename artifact file
run: mv ./build/oc_telegram_shop.ocmod.zip ./build/${{ steps.meta.outputs.filename }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.meta.outputs.tag }}
files: ./build/${{ steps.meta.outputs.filename }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}