Skip to content

Commit

Permalink
Add pre release version of CD
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreal2000 committed May 22, 2024
1 parent a459e22 commit 07ab260
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/build-tdlib.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Build TDLib

on: workflow_dispatch
on:
workflow_dispatch:
workflow_call:

env:
TDLIB_VERSION: 2589c3fd46925f5d57e4ec79233cd1bd0f5d0c09
Expand Down Expand Up @@ -35,11 +37,16 @@ jobs:
with:
path: td/
key: ${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}
- name: Zip tdlib
run: |
cd ./td
zip -q -r -6 ${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}.zip tdlib
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}
path: ./td/tdlib/
path: ./td/${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}.zip
compression-level: 0
overwrite: true

build-macos:
Expand Down Expand Up @@ -76,11 +83,16 @@ jobs:
with:
path: td/
key: ${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}
- name: Zip tdlib
run: |
cd ./td
zip -q -r -6 ${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}.zip tdlib
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}
path: ./td/tdlib/
path: ./td/${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}.zip
compression-level: 0
overwrite: true

build-windows:
Expand Down Expand Up @@ -116,9 +128,14 @@ jobs:
with:
path: td/
key: ${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}
- name: Zip tdlib
run: |
cd ./td
zip -q -r -6 ${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}.zip tdlib
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}
path: ./td/tdlib/
path: ./td/${{ steps.cache-tdlib-restore.outputs.cache-primary-key }}.zip
compression-level: 0
overwrite: true
25 changes: 25 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 07ab260

Please sign in to comment.