Skip to content

Commit

Permalink
[ci] CI HELL
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed May 23, 2021
1 parent 2c73016 commit cf94b87
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 44 deletions.
20 changes: 1 addition & 19 deletions .github/workflows/ci-exhaustive.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: CI (exhaustive)
on:
push:
tags:
- 'deploy/[0-9]+.[0-9]+.[0-9]+'
on: workflow_dispatch
jobs:
auto-cancel:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -165,22 +162,7 @@ jobs:
- build-linux-swift-5
- cocoapods-5-4
steps:
- uses: jungwinter/split@v1
id: split
with:
seperator: '/' # this is correct, the action is typo’d despite warning
msg: ${{ github.ref }}

- uses: actions/checkout@v2
with:
fetch-depth: 0 # zero means “all” (or push fails)
token: ${{ secrets.JAZZY_PAT }} # or won’t trigger our workflow

- name: Tag RC
run: |
git config user.name github-actions
git config user.email [email protected]
git tag rc/$v --force
git push origin rc/$v --force
env:
v: ${{ steps.split.outputs._3 }}
16 changes: 8 additions & 8 deletions .github/workflows/post-publish.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Post-Publish
on:
release:
types: published
types: [created]
jobs:
pods:
runs-on: macos-latest
steps:

- name: Start Deployment
uses: bobheadxi/deployments@v1
uses: bobheadxi/deployments@v0.5.2
id: deployment
with:
step: start
Expand All @@ -24,7 +24,7 @@ jobs:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

- name: Seal Deployment
uses: bobheadxi/deployments@v1
uses: bobheadxi/deployments@v0.5.2
if: always()
with:
step: finish
Expand All @@ -37,7 +37,7 @@ jobs:
steps:

- name: Start Deployment
uses: bobheadxi/deployments@v1
uses: bobheadxi/deployments@v0.5.2
id: deployment
with:
step: start
Expand All @@ -59,7 +59,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}

- name: Seal Deployment
uses: bobheadxi/deployments@v1
uses: bobheadxi/deployments@v0.5.2
if: always()
with:
step: finish
Expand All @@ -72,7 +72,7 @@ jobs:
steps:

- name: Start Deployment
uses: bobheadxi/deployments@v1
uses: bobheadxi/deployments@v0.5.2
id: deployment
with:
step: start
Expand All @@ -95,11 +95,11 @@ jobs:
- run: git config user.name Travis
- run: git config user.email "[email protected]"
- run: git commit -m 'Updated docs for v${{ github.event.release.tag_name }}'
- run: git remote add secure-origin https://${{ JAZZY_PAT }}@github.com/mxcl/PromiseKit.git
- run: git remote add secure-origin https://${{ secrets.JAZZY_PAT }}@github.com/mxcl/PromiseKit.git
- run: git push secure-origin gh-pages

- name: Seal Deployment
uses: bobheadxi/deployments@v1
uses: bobheadxi/deployments@v0.5.2
if: always()
with:
step: finish
Expand Down
26 changes: 9 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Publish
on:
push:
tags:
- 'rc/[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
inputs:
version:
description: Version to publish
required: true
jobs:
lint:
runs-on: macos-latest
Expand Down Expand Up @@ -33,7 +35,7 @@ jobs:
ruby -i -pe "sub(/CURRENT_PROJECT_VERSION = [0-9.]+/, 'CURRENT_PROJECT_VERSION = $v')" PromiseKit.xcodeproj/project.pbxproj
ruby -i -pe "sub(/s.version = '[0-9.]+'/, 's.version = \"$v\"')" PromiseKit.podspec
env:
v: ${{ steps.split.outputs._3 }}
v: ${{ github.event.inputs.version }}
- run: |
! (git diff --quiet)
- run: |
Expand All @@ -42,22 +44,12 @@ jobs:
git commit -am "PromiseKit $v"
git push
env:
v: ${{ steps.split.outputs._3 }}
v: ${{ github.event.inputs.version }}
- uses: softprops/action-gh-release@v1
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.split.outputs._3 }}
name: ${{ steps.split.outputs._3 }}

tidy:
runs-on: ubuntu-latest
needs: create-release
steps:
- uses: actions/checkout@v2
with:
depth: 0
- run: git push origin :deploy/${{ github.event.release.tag_name }}
- run: git push origin :rc/${{ github.event.release.tag_name }}
tag_name: ${{ github.event.inputs.version }}
name: ${{ github.event.inputs.version }}

0 comments on commit cf94b87

Please sign in to comment.