diff --git a/.github/workflows/build-tdlib.yml b/.github/workflows/build-tdlib.yml index c916b3b..9498f2d 100644 --- a/.github/workflows/build-tdlib.yml +++ b/.github/workflows/build-tdlib.yml @@ -1,6 +1,8 @@ name: Build TDLib -on: workflow_dispatch +on: + workflow_dispatch: + workflow_call: env: TDLIB_VERSION: 2589c3fd46925f5d57e4ec79233cd1bd0f5d0c09 diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..f81b15b --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,25 @@ +name: CD + +on: + push: + tags: + # - "v[0-9]+.[0-9]+.[0-9]+" + - "*" + +env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + +jobs: + build-tdlib: + uses: ./.github/workflows/build-tdlib.yml + release: + runs-on: ubuntu-latest + needs: build-tdlib + steps: + - name: Download artifacts + run: gh run download ${{ github.run_id }} -R $REPO + - name: Zip artifacts + run: find * -maxdepth 0 -type d -execdir zip -q -r -6 '{}.zip' '{}' \; + - name: Create release + run: gh release create ${{ github.ref_name }} -R $REPO --generate-notes --prerelease ./*.zip \ No newline at end of file