-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
Publish sources of examples as separated artifacts are attached to pre-release #569
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I like the idea.
We can merge that, however I am pretty sure the sources.sh
script can be made much shorter, by putting the examples in an array and then iterating over it.
Something like this (pseudo code! does not work!):
#!/usr/bin/env bash
samples="play-java-dagger2", "play-java-dagger2",...
for sample in samples
pushd ${sample}-example
zip -r -q ../${sample}-sbt-example.zip . -x "gradle/*" -x "scripts/*" -x "*gradle*"
zip -r -q ../${sample}-gradle-example.zip . -x "project/*" -x "scripts/*" -x "*.sbt"
popd
end for
Even more, instead of hardcoding an array you could even just list all directories and use that, something like:
...
samples=$(ls -d */ | cut -f1 -d'/') # from https://stackoverflow.com/a/22072749/810109
...
This way we don't have to include update the script each time (but we have to for the .yml file...)
We can optimize this later of course and merge this for now.
Yes, of course I had thought about that, but decided to stay a verbose variant before finilize #558 😄 |
Actually I think we can also just use
It says you can use glob expressions, so that should avoid listing all zip files per hand. |
👍 I am ok to merge this if we know if the tag gets overriden or not, or if we have to delete it before creating a new one. |
Created |
I published examples twice for my fork (https://github.com/ihostage/play-samples/actions) that's why I'm sure we don't need to delete something manually before update artifacts. Working process shouldn't change, we just still merge PRs into target branches and published artifacts will be updated and can be re-downloaded by the same links. |
I understand, I was just wondering if the |
453caf7
to
2b1a3a7
Compare
Unfortunately, tag doesn't update only artifacts, see softprops/action-gh-release#293 |
OK, so the artifacts get updated, but the tag not.
I think it's not necessary to do this workaround, let's just wait for I think it is not so important to move the tag if the artifacts are up to date anyway. Also the link (https://github.com/playframework/play-samples/releases/tag/nightly) does not change so this is also ok. |
80d4b08
to
951dda6
Compare
951dda6
to
4709fa2
Compare
So... I think we are ready to merge 🏃♂️ |
👍 |
@Mergifyio backport 2.9.x |
@Mergifyio backport 3.0.x |
✅ Backports have been created
|
✅ Backports have been created
|
Actually thinking about it... the name |
Seems like is done if it still helps. |
Hmmm... I see only one difference between the recommendation (softprops/action-gh-release#171 (comment)) - name: Update dev-build tag
if: ${{ github.event_name == 'push' }}
run: |
git tag -d ${{ env.dev_tag }} || true
git push origin :refs/tags/${{ env.dev_tag }} || true
git tag ${{ env.dev_tag }}
git push origin ${{ env.dev_tag }} and our implementation - name: Delete Release
run: gh release delete nightly --cleanup-tag || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} I think we don't need change anything 🤔 |
OK 😉 |
Advantages:
How it works, see:
https://github.com/ihostage/play-samples/releases/tag/nightly