From e3f5288ae7c3d22741cdd537dc94449d0633c986 Mon Sep 17 00:00:00 2001 From: zhaixian Date: Mon, 8 Jan 2024 14:49:35 +0800 Subject: [PATCH] Update workflow --- .github/workflows/deploy_to_cocoapods.yml | 26 ++++++++++++++++ .github/workflows/release.yml | 38 ----------------------- .github/workflows/static.yml | 8 ++--- 3 files changed, 29 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/deploy_to_cocoapods.yml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/deploy_to_cocoapods.yml b/.github/workflows/deploy_to_cocoapods.yml new file mode 100644 index 0000000..c449b8e --- /dev/null +++ b/.github/workflows/deploy_to_cocoapods.yml @@ -0,0 +1,26 @@ +name: Deploy to Cocoapods + +on: + push: + tags: + - '*' + +jobs: + build: + + runs-on: macOS-latest + + steps: + - uses: actions/checkout@v1 + + - name: Install Cocoapods + run: gem install cocoapods + + - name: Deploy to Cocoapods + run: | + set -eo pipefail + export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`) + pod lib lint --allow-warnings + pod trunk push --allow-warnings + env: + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 070742f..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: AliyunpanSDK Release - -on: - workflow_dispatch: - version: - description: 'release version' - required: true - type: string - -permissions: - contents: read - pages: write - id-token: write - -jobs: - release: - runs-on: macOS-latest - steps: - - uses: ruby/setup-ruby@v1 - with: - ruby-version: 2.7.4 - bundler-cache: true - - name: Checkout - uses: actions/checkout@v4 - - name: release - run: bundle exec fastlane release $VERSION - env: - VERSION: ${{ inputs.version }} - - name: Install Cocoapods - run: gem install cocoapods - - name: Deploy to Cocoapods - run: | - set -eo pipefail - pod lib lint --allow-warnings - pod trunk push --allow-warnings - env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} - diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 472259e..12a2d8f 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -22,14 +22,12 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} runs-on: macOS-latest steps: - - uses: ruby/setup-ruby@v1 - with: - ruby-version: 2.7.4 - bundler-cache: true - name: Checkout uses: actions/checkout@v4 + - name: Install Jazzy + run: gem install jazzy - name: Generate Document - run: bundle exec fastlane doc + run: jazzy - name: Setup Pages uses: actions/configure-pages@v4 - name: Upload artifact