From b40adc5fdb00b6ca06c1276274f12fd10fd0076e Mon Sep 17 00:00:00 2001 From: Andrea Longoni Date: Wed, 22 May 2024 15:19:57 +0200 Subject: [PATCH] Add pre release version of CD --- .github/workflows/build-tdlib.yml | 4 +++- .github/workflows/cd.yml | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cd.yml 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..ab49584 --- /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 mv '{}' tdlib \; -execdir zip -q -r -m -6 '{}.zip' 'tdlib' \; + - name: Create release + run: gh release create ${{ github.ref_name }} -R $REPO --generate-notes --prerelease ./*.zip \ No newline at end of file