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

GitHub actions last round + badges #523

Merged
merged 1 commit into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Check

on:
push:
branches: [ main ]
pull_request:

push:
branches:
- main # Check branch after merge

concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
group: ci-${{ github.ref }}
Expand All @@ -31,7 +33,7 @@ jobs:

tests:
name: Tests
needs: # Waiting more lightweight checks
needs:
- "check-code-style"
- "check-binary-compatibility"
- "check-docs"
Expand All @@ -43,6 +45,7 @@ jobs:

finish:
name: Finish
if: github.event_name == 'pull_request'
needs: # Should be last
- "tests"
uses: playframework/.github/.github/workflows/rtm.yml@v2
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
push:
branches: # Snapshots
- main
tags: ["*"] # Releases
tags: ["**"] # Releases
release:
types: [published]
Comment on lines +8 to +9
Copy link
Member

Choose a reason for hiding this comment

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

@mkurz Are we really need to run this workflow on published release event? 🤔
It was failed because artifacts had been already published by pushing tag event 🤷‍♂️
https://github.com/playframework/twirl/actions/runs/7127596926
https://github.com/playframework/twirl/actions/runs/7127594512

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I saw that in the past. The idea back when we added that was that we can just create and publish a GitHub release, which will create the tag and then 20 minutes later or something the release is on maven central.
That was the idea.

However, we never use that approach, I think it's a bad approach, because if something goes wrong with publishing to maven central (or tests fail, compile problem, etc.) and the release never makes it to the maven central repos, people already get notified by GitHub about the release.
So that's why it's always safer to push the tag by hand, wait for maven central, and when that is ready, publish the GitHub release for the already existing tag.

I think we should remove the on: release event for all repos, since I consider it unsafe and bad practise.

(I know we always had/have errors but I just ignored it for now)

Copy link
Member

Choose a reason for hiding this comment

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

However, we never use that approach, I think it's a bad approach, because if something goes wrong with publishing to maven central (or tests fail, compile problem, etc.) and the release never makes it to the maven central repos, people already get notified by GitHub about the release.
So that's why it's always safer to push the tag by hand, wait for maven central, and when that is ready, publish the GitHub release for the already existing tag.

I absolutely agree with you 👍


jobs:
publish-artifacts:
Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
# Twirl [![Latest version](https://index.scala-lang.org/playframework/twirl/twirl-api/latest.svg?color=orange)](https://index.scala-lang.org/playframework/twirl/twirl-api) [![Build Status](https://travis-ci.org/playframework/twirl.svg)](https://travis-ci.org/playframework/twirl)
# Twirl

[![Twitter Follow](https://img.shields.io/twitter/follow/playframework?label=follow&style=flat&logo=twitter&color=brightgreen)](https://twitter.com/playframework)
[![Discord](https://img.shields.io/discord/931647755942776882?logo=discord&logoColor=white)](https://discord.gg/g5s2vtZ4Fa)
[![GitHub Discussions](https://img.shields.io/github/discussions/playframework/playframework?&logo=github&color=brightgreen)](https://github.com/playframework/playframework/discussions)
[![StackOverflow](https://img.shields.io/static/v1?label=stackoverflow&logo=stackoverflow&logoColor=fe7a16&color=brightgreen&message=playframework)](https://stackoverflow.com/tags/playframework)
[![YouTube](https://img.shields.io/youtube/channel/views/UCRp6QDm5SDjbIuisUpxV9cg?label=watch&logo=youtube&style=flat&color=brightgreen&logoColor=ff0000)](https://www.youtube.com/channel/UCRp6QDm5SDjbIuisUpxV9cg)
[![Twitch Status](https://img.shields.io/twitch/status/playframework?logo=twitch&logoColor=white&color=brightgreen&label=live%20stream)](https://www.twitch.tv/playframework)
[![OpenCollective](https://img.shields.io/opencollective/all/playframework?label=financial%20contributors&logo=open-collective)](https://opencollective.com/playframework)

[![Build Status](https://github.com/playframework/twirl/actions/workflows/build-test.yml/badge.svg)](https://github.com/playframework/twirl/actions/workflows/build-test.yml)
[![Maven](https://img.shields.io/maven-central/v/com.typesafe.play/twirl-api_2.13.svg?logo=apache-maven)](https://mvnrepository.com/artifact/com.typesafe.play/twirl-api_2.13)
[![Repository size](https://img.shields.io/github/repo-size/playframework/twirl.svg?logo=git)](https://github.com/playframework/twirl)
[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)
[![Mergify Status](https://img.shields.io/endpoint.svg?url=https://api.mergify.com/v1/badges/playframework/twirl&style=flat)](https://mergify.com)

Twirl is the [Play][play-site] [template engine][docs].

Expand Down
2 changes: 0 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ val mimaSettings = Seq(
)
)

ThisBuild / sonatypeProfileName := "com.typesafe.play"

// Customise sbt-dynver's behaviour to make it work with tags which aren't v-prefixed
ThisBuild / dynverTagPrefix := ""

Expand Down