Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify Release and CI workflows 🤝 #236

Merged
merged 1 commit into from
May 12, 2021
Merged

Conversation

p4checo
Copy link
Member

@p4checo p4checo commented May 11, 2021

Checklist

Motivation and Context

Unfortunately, workflow_run triggers only capture the branch that triggered the workflow(s) they depend on, which means that we can't use them while filtering for tag pushes (which is what we want for triggering releases). That's why startsWith(github.ref, 'refs/tags/') was never true when the Release workflow ran.

After quite a bit of experimentation and research, I came to the conclusion that we should just keep it simple (KISS and all that 🙈) and just unify our whole CI into a single workflow which easily achieves the setup we want.

Hopefully third time will be the charm to get our releases working via GitHub Actions 🍀

Description

  • Rename Release workflow jobs deploy-github and deploy-cocoapods to release-github and release-cocoapods respectively.

  • Move release workflow jobs to the CI Workflow, configured to only run on tag pushes (X.Y.Z) and with dependencies on build-test, swiftpm, cocoapods and carthage jobs.

@codecov
Copy link

codecov bot commented May 11, 2021

Codecov Report

Merging #236 (85c3c0e) into master (ac50c68) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #236   +/-   ##
=======================================
  Coverage   94.99%   94.99%           
=======================================
  Files          97       97           
  Lines        3296     3296           
=======================================
  Hits         3131     3131           
  Misses        165      165           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac50c68...85c3c0e. Read the comment docs.

Unfortunately, `workflow_run` triggers only capture the branch that
triggered the workflow(s) they depend on, which means that we can't use
them while filtering for tag pushes (which is what we want for
triggering releases). That's why `startsWith(github.ref, 'refs/tags/')`
was never `true` when the `Release` workflow ran.

After quite a bit of experimentation and research, I came to the
conclusion that we should just keep it simple (KISS and all that 🙈)
and just unify our whole CI into a single workflow which easily
achieves the setup we want.

Hopefully third time will be the charm to get our releases working via
GitHub Actions 🍀

## Changes

- Rename `Release` workflow jobs `deploy-github` and `deploy-cocoapods`
to `release-github` and `release-cocoapods` respectively.

- Move release workflow jobs to the `CI` Workflow, configured to only
run on tag pushes (`X.Y.Z`) and with dependencies on `build-test`,
`swiftpm`, `cocoapods` and `carthage` jobs.
@p4checo p4checo force-pushed the unify-release-workflow-into-ci branch from 3c74772 to 85c3c0e Compare May 12, 2021 09:43
@p4checo p4checo merged commit af7a9bc into master May 12, 2021
@p4checo p4checo deleted the unify-release-workflow-into-ci branch May 12, 2021 14:09
@p4checo p4checo restored the unify-release-workflow-into-ci branch May 12, 2021 14:10
@p4checo p4checo deleted the unify-release-workflow-into-ci branch May 12, 2021 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants