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

Add workflow for continuous delivery #569

Merged
merged 4 commits into from
Nov 2, 2021

Conversation

awvwgk
Copy link
Member

@awvwgk awvwgk commented Sep 15, 2021

Since our default branch is always deployable, we can easily create a continuous release which contains the latest fpm binaries and source version. This PR adds a workflow to create and move a tag called current with the head of the git repository and update the binary artifacts to the latest CI outputs.

Example: https://github.com/awvwgk/fortran-package-manager/releases/tag/current

@awvwgk awvwgk added the automation Automated workflows for this project label Sep 15, 2021
@awvwgk awvwgk linked an issue Sep 16, 2021 that may be closed by this pull request
@awvwgk
Copy link
Member Author

awvwgk commented Sep 16, 2021

@rouson, would a continuous delivery resolve #416 for you?

@LKedward
Copy link
Member

LKedward commented Sep 16, 2021

Thanks Sebastian @awvwgk, this would be very useful. Quick question: is this restricted to the main branch? I can't see anything that would prevent it running on pushes to other branches.

@awvwgk
Copy link
Member Author

awvwgk commented Sep 16, 2021

It will run on any push event, this includes feature branches on forks. Since we only have a single branch in the main repository this is not an issue (now), but it enables contributors to make use of building continuous releases on their forks for testing purposes. We can limit it to the main branch of course if this is a concern.

@LKedward
Copy link
Member

LKedward commented Nov 1, 2021

... it enables contributors to make use of building continuous releases on their forks for testing purposes

I can see the benefit of this for testing, however I don't like the fact that the current tag would be dependent on which ever branch the workflow most recently ran on - or have I misunderstood this? I think we should either have a different tag per branch or restrict the workflow to only run on the default branch. What do you think?

@awvwgk
Copy link
Member Author

awvwgk commented Nov 1, 2021

I added a dependency on a repository secret DEPLOY_BRANCH which will be used to determine whether a branch should be deployed or not. If the secret is not set no branch should be deployed. We would set it to refs/heads/main here to only deploy the default branch, but someone could set it to refs/heads at their fork to deploy all branches or to refs/heads/devel to deploy only the devel branch.

@rouson
Copy link
Contributor

rouson commented Nov 1, 2021

@rouson, would a continuous delivery resolve #416 for you?

I'm just realizing that I never responded to the above question. I'm not familiar with continuous release, but from what is described here, yes. I think this would solve issue. #416 for me.

Copy link
Member

@LKedward LKedward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Sebastian, LGTM 👍

Is it possible to link to the current release download page from the README or does it change with each deployment?

@awvwgk
Copy link
Member Author

awvwgk commented Nov 1, 2021

The tag will move but the URL will remain unchanged (a nice thing about git, even tags are mutable). To overwrite the artifacts on the tag, I'm stripping the version number information from the artifacts otherwise they would pile up over time on this release.

Copy link
Member

@milancurcic milancurcic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you! I don't understand all the details of the CI.yml, but agree with the overall strategy. Please merge when ready.

@awvwgk awvwgk merged commit a460e27 into fortran-lang:main Nov 2, 2021
@awvwgk awvwgk deleted the continuous-delivery branch November 2, 2021 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation Automated workflows for this project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Establishing a release schedule
4 participants