From 32ab6d3852e91312dcbfc3f3a749cfc691da75fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanpe=20Catal=C3=A1n?= Date: Mon, 15 Feb 2021 15:19:09 +0100 Subject: [PATCH] unify jobs --- .github/workflows/release.yml | 76 +++++++++++++++-------------------- 1 file changed, 32 insertions(+), 44 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7766202b..fcba8f54 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,47 +1,35 @@ name: Release -on: - workflow_dispatch: - inputs: - release_version: - description: "Release version" - required: true - default: "" +on: [workflow_dispatch] jobs: - bump_pod_version: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: setup fastlane - run: brew install fastlane - - name: bump version - run: fastlane bump_version next_version:${{ github.event.inputs.release_version }} - - name: commit changes - uses: stefanzweifel/git-auto-commit-action@v4 - with: - branch: 'main' - commit_message: 'Bump version ${{ github.event.inputs.release_version }}' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - create_release: - runs-on: ubuntu-latest - needs: bump_pod_version - steps: - - uses: actions/checkout@v2 - - name: publish release - uses: release-drafter/release-drafter@v5 - with: - publish: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - pod_trunk_push: - runs-on: macOS-latest - needs: create_release - steps: - - uses: actions/checkout@v2 - - name: publish pod - env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} - run: pod trunk push SkeletonView.podspec --allow-warnings --verbose + release_version: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v2 + + - name: setup fastlane + run: brew install fastlane + + - name: publish release + id: publish_release + uses: release-drafter/release-drafter@v5 + with: + publish: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: update podspec file + run: fastlane bump_version next_version:${{ steps.publish_release.outputs.tag_name }} + + - name: commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: 'main' + commit_message: 'Bump version ${{ steps.publish_release.outputs.tag_name }}' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: push pod + env: + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + run: pod trunk push SkeletonView.podspec --allow-warnings --verbose