|
| 1 | +name: CD |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + inputs: |
| 5 | + version: |
| 6 | + required: true |
| 7 | +jobs: |
| 8 | + pods: |
| 9 | + runs-on: macos-latest |
| 10 | + steps: |
| 11 | + |
| 12 | + - name: Start Deployment |
| 13 | + |
| 14 | + id: deployment |
| 15 | + with: |
| 16 | + step: start |
| 17 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 18 | + env: pods |
| 19 | + |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + with: |
| 22 | + submodules: true |
| 23 | + |
| 24 | + - run: pod trunk push --allow-warnings --skip-tests --skip-import-validation |
| 25 | + env: |
| 26 | + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} |
| 27 | + |
| 28 | + - name: Seal Deployment |
| 29 | + |
| 30 | + if: always() |
| 31 | + with: |
| 32 | + step: finish |
| 33 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 34 | + status: ${{ job.status }} |
| 35 | + deployment_id: ${{ steps.deployment.outputs.deployment_id }} |
| 36 | + |
| 37 | + # fails: https://github.com/Carthage/Carthage/issues/3130 |
| 38 | + # carthage: |
| 39 | + # runs-on: macos-latest |
| 40 | + # steps: |
| 41 | + |
| 42 | + # - name: Start Deployment |
| 43 | + # uses: bobheadxi/[email protected] |
| 44 | + # id: deployment |
| 45 | + # with: |
| 46 | + # step: start |
| 47 | + # token: ${{ secrets.GITHUB_TOKEN }} |
| 48 | + # env: carthage |
| 49 | + |
| 50 | + # - uses: joutvhu/get-release@v1 |
| 51 | + # id: release |
| 52 | + # with: |
| 53 | + # tag_name: ${{ github.event.inputs.version }} |
| 54 | + # env: |
| 55 | + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 56 | + |
| 57 | + # - uses: actions/checkout@v2 |
| 58 | + # - run: carthage build --no-skip-current --use-xcframeworks --platform macOS,iOS,watchOS,tvOS --archive |
| 59 | + # - run: mv PromiseKit.framework.zip PromiseKit-$v.framework.zip |
| 60 | + |
| 61 | + # - uses: actions/upload-release-asset@v1 |
| 62 | + # with: |
| 63 | + # upload_url: ${{ steps.outputs.release.upload_url }} |
| 64 | + # asset_path: ./PromiseKit-$v.framework.zip |
| 65 | + # asset_name: PromiseKit-$v.framework.zip |
| 66 | + # asset_content_type: application/zip |
| 67 | + # env: |
| 68 | + # v: ${{ github.event.inputs.version }} |
| 69 | + # GITHUB_TOKEN: ${{ github.token }} |
| 70 | + |
| 71 | + # - name: Seal Deployment |
| 72 | + # uses: bobheadxi/[email protected] |
| 73 | + # if: always() |
| 74 | + # with: |
| 75 | + # step: finish |
| 76 | + # token: ${{ secrets.GITHUB_TOKEN }} |
| 77 | + # status: ${{ job.status }} |
| 78 | + # deployment_id: ${{ steps.deployment.outputs.deployment_id }} |
| 79 | + |
| 80 | + docs: |
| 81 | + runs-on: macos-latest |
| 82 | + steps: |
| 83 | + |
| 84 | + - name: Start Deployment |
| 85 | + |
| 86 | + id: deployment |
| 87 | + with: |
| 88 | + step: start |
| 89 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 90 | + env: docs |
| 91 | + |
| 92 | + - uses: actions/checkout@v2 |
| 93 | + - run: gem install jazzy |
| 94 | + - run: | |
| 95 | + jazzy --config .github/jazzy.yml \ |
| 96 | + --github_url 'https://github.com/mxcl/PromiseKit' \ |
| 97 | + --module-version ${{ github.event.inputs.version }} |
| 98 | + - run: git remote update |
| 99 | + - run: git checkout gh-pages |
| 100 | + - run: rm -rf reference/v6 |
| 101 | + - run: mv output reference/v6 |
| 102 | + - run: git add reference/v6 |
| 103 | + - run: git config user.name github-actions |
| 104 | + - run: git config user.email [email protected] |
| 105 | + - run: git commit -m 'Updated docs for v${{ github.event.inputs.version }}' |
| 106 | + - run: git remote add secure-origin https://${{ secrets.JAZZY_PAT }}@github.com/mxcl/PromiseKit.git |
| 107 | + - run: git push secure-origin gh-pages |
| 108 | + |
| 109 | + - name: Seal Deployment |
| 110 | + |
| 111 | + if: always() |
| 112 | + with: |
| 113 | + step: finish |
| 114 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 115 | + status: ${{ job.status }} |
| 116 | + deployment_id: ${{ steps.deployment.outputs.deployment_id }} |
0 commit comments