Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
XMLHexagram authored Sep 1, 2023
1 parent 4dbb759 commit 3e596d1
Showing 1 changed file with 29 additions and 13 deletions.
42 changes: 29 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,26 @@ jobs:
set -e
cd gifski && git describe --contains
- name: Make all
working-directory: .
run: ./scripts/all.sh

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: GifskiFramework.zip
path: ./gifski/GifskiFramework.zip
if-no-files-found: error

create-release:
runs-on: macos-13
needs: [build-GifskiFramework]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set Envs
run: |
ARTIFACT_PATH="${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}"
Expand All @@ -53,29 +73,25 @@ jobs:
RELEASE_TAG=$GIFSKI_VERSION
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
- name: Make all
working-directory: .
run: ./scripts/all.sh

- name: Download XCFramework
uses: actions/download-artifact@v3
with:
name: GifskiFramework.zip
path: ${{ env.ARTIFACT_DIR }}

- name: Get Checksum
run: |
ARTIFACT_CHECKSUM=$(swift package compute-checksum ${{ env.ARTIFACT_PATH }})
echo "ARTIFACT_CHECKSUM=$ARTIFACT_CHECKSUM" >> $GITHUB_ENV
echo "ARTIFACT_CHECKSUM=$ARTIFACT_CHECKSUM" >> $GITHUB_ENV
- name: Update Package.swift
run: |
python3 scripts/swift_package_generator.py --url "${{ env.RELEASES_DOWNLOAD_URL }}/${{ env.RELEASE_TAG }}/${{ env.ARTIFACT_NAME }}" --checksum ${{ env.ARTIFACT_CHECKSUM }}
git add Package.swift || true
git commit -m "[no ci] Bump tdlib ${{ env.RELEASE_TAG }}" || true
git push origin main || true
# - name: Upload artifact
# uses: actions/upload-artifact@v2
# with:
# name: ${{ env.ARTIFACT_NAME }}
# path: ${{ env.ARTIFACT_DIR }}

- name: Release
uses: softprops/action-gh-release@v1
with:
Expand Down

0 comments on commit 3e596d1

Please sign in to comment.