├── .github ├── dependabot.yml ├── release-drafts │ ├── increasing-major-version.yml │ ├── increasing-minor-version.yml │ ├── increasing-patch-version.yml │ └── base.yml ├── workflows │ ├── rtm.yml │ ├── sync.yml │ ├── gradle-wrapper-validation.yml │ ├── binary-check.yml │ ├── antora.yml │ ├── publish.yml │ └── cmd.yml ├── sync.yml └── mergify.yml ├── FUNDING.yml ├── SECURITY.md ├── sbt └── common.sbt ├── CONTRIBUTING.md ├── CODE_OF_CONDUCT.md ├── README.md └── RELEASING.md /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /.github/release-drafts/increasing-major-version.yml: -------------------------------------------------------------------------------- 1 | tag-template: '$NEXT_MAJOR_VERSION' 2 | version-resolver: 3 | default: major 4 | _extends: .github:.github/release-drafts/base.yml 5 | -------------------------------------------------------------------------------- /.github/release-drafts/increasing-minor-version.yml: -------------------------------------------------------------------------------- 1 | tag-template: '$NEXT_MINOR_VERSION' 2 | version-resolver: 3 | default: minor 4 | _extends: .github:.github/release-drafts/base.yml 5 | -------------------------------------------------------------------------------- /.github/release-drafts/increasing-patch-version.yml: -------------------------------------------------------------------------------- 1 | tag-template: '$NEXT_PATCH_VERSION' 2 | version-resolver: 3 | default: patch 4 | _extends: .github:.github/release-drafts/base.yml 5 | -------------------------------------------------------------------------------- /FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [playframework] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | open_collective: playframework # Replace with a single Open Collective username 5 | -------------------------------------------------------------------------------- /.github/workflows/rtm.yml: -------------------------------------------------------------------------------- 1 | name: Mark Pull Request as Ready To Merge 2 | 3 | on: 4 | workflow_call: 5 | 6 | jobs: 7 | cmd: 8 | name: Ready To Merge 9 | if: github.event_name == 'pull_request' 10 | runs-on: ubuntu-24.04 11 | steps: 12 | - name: Ready To Merge 13 | run: echo 'Ready To Merge' 14 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | If you have found an issue in an Play Framework project or any of the projects within the Play Framework GitHub organization that might have security implications, you can report it to . We will make sure those will get handled with priority. Thank you for your responsible disclosure! 6 | 7 | -------------------------------------------------------------------------------- /.github/workflows/sync.yml: -------------------------------------------------------------------------------- 1 | name: Sync Files 2 | on: 3 | push: 4 | branches: 5 | - main 6 | jobs: 7 | sync: 8 | runs-on: ubuntu-24.04 9 | steps: 10 | - name: Checkout 11 | uses: actions/checkout@v6 12 | - name: Run GitHub File Sync 13 | uses: BetaHuhn/repo-file-sync-action@v1 14 | with: 15 | GH_PAT: ${{ secrets.GH_REPO_TOKEN }} 16 | -------------------------------------------------------------------------------- /.github/workflows/gradle-wrapper-validation.yml: -------------------------------------------------------------------------------- 1 | name: Gradle Wrapper Validation 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | ref: 7 | type: string 8 | required: false 9 | default: '' 10 | 11 | jobs: 12 | cmd: 13 | name: Gradle Wrapper Validation 14 | runs-on: ubuntu-24.04 15 | steps: 16 | - name: Block deprecated repos in /etc/hosts 17 | run: | 18 | sudo echo "127.0.0.1 repo.scala-sbt.org" | sudo tee -a /etc/hosts 19 | sudo echo "127.0.0.1 repo.typesafe.com" | sudo tee -a /etc/hosts 20 | - name: Checkout 21 | uses: actions/checkout@v6 22 | with: 23 | # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves 24 | fetch-depth: 0 25 | ref: ${{ inputs.ref }} 26 | 27 | - name: Gradle Wrapper Validation 28 | uses: gradle/actions/wrapper-validation@v5 29 | -------------------------------------------------------------------------------- /sbt/common.sbt: -------------------------------------------------------------------------------- 1 | // Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc. 2 | 3 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // NOTE: !!! THIS IS A COPY !!! // 5 | // To edit this file use the main version in https://github.com/playframework/.github/blob/main/sbt/common.sbt // 6 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// 7 | 8 | /** 9 | * If you need extra commands to format source code or other documents, add following line to your `build.sbt` 10 | * {{{ 11 | * val _ = sys.props += ("sbt_formatCode" -> List("", "",...).mkString(";")) 12 | * }}} 13 | */ 14 | addCommandAlias( 15 | "formatCode", 16 | List( 17 | "headerCreateAll", 18 | "scalafmtSbt", 19 | "scalafmtAll", 20 | "javafmtAll" 21 | ).mkString(";") + sys.props.get("sbt_formatCode").map(";" + _).getOrElse("") 22 | ) 23 | 24 | /** 25 | * If you need extra commands to validate source code or other documents, add following line to your `build.sbt` 26 | * {{{ 27 | * val _ = sys.props += ("sbt_validateCode" -> List("", "",...).mkString(";")) 28 | * }}} 29 | */ 30 | addCommandAlias( 31 | "validateCode", 32 | List( 33 | "headerCheckAll", 34 | "scalafmtSbtCheck", 35 | "scalafmtCheckAll", 36 | "javafmtCheckAll" 37 | ).mkString(";") + sys.props.get("sbt_validateCode").map(";" + _).getOrElse("") 38 | ) 39 | -------------------------------------------------------------------------------- /.github/sync.yml: -------------------------------------------------------------------------------- 1 | # More details in https://github.com/marketplace/actions/repo-file-sync-action 2 | 3 | playframework/cachecontrol: 4 | - source: sbt/common.sbt 5 | dest: common.sbt 6 | 7 | #playframework/interplay: 8 | 9 | #playframework/omnidoc: 10 | 11 | #playframework/play-doc: 12 | 13 | playframework/play-ebean: 14 | - source: sbt/common.sbt 15 | dest: common.sbt 16 | - source: sbt/common.sbt 17 | dest: docs/common.sbt 18 | 19 | #playframework/play-file-watch: 20 | 21 | #playframework/play-grpc: 22 | 23 | #playframework/play-java-seed.g8: 24 | 25 | #playframework/play-json: 26 | 27 | #playframework/play-mailer: 28 | 29 | #playframework/play-samples: 30 | 31 | #playframework/play-scala-seed.g8: 32 | 33 | #playframework/play-slick: 34 | 35 | playframework/play-soap: 36 | - source: sbt/common.sbt 37 | dest: common.sbt 38 | 39 | #playframework/play-socket.io: 40 | 41 | #playframework/play-webgoat: 42 | 43 | #playframework/play-ws: 44 | 45 | playframework/playframework: 46 | - source: sbt/common.sbt 47 | dest: common.sbt 48 | - source: sbt/common.sbt 49 | dest: documentation/common.sbt 50 | 51 | playframework/playframework@2.8.x: 52 | - source: sbt/common.sbt 53 | dest: common.sbt 54 | - source: sbt/common.sbt 55 | dest: documentation/common.sbt 56 | 57 | #playframework/playframework.com: 58 | 59 | #playframework/scalatestplus-play: 60 | 61 | #playframework/twirl: 62 | 63 | #playframework/anorm: 64 | 65 | #playframework/netty-reactive-streams: 66 | 67 | #playframework/play-java-react-seed: 68 | 69 | #playframework/play-scala-react-seed: 70 | 71 | #playframework/play-java-angular-seed: 72 | 73 | #playframework/play-scala-angular-seed: 74 | 75 | -------------------------------------------------------------------------------- /.github/mergify.yml: -------------------------------------------------------------------------------- 1 | defaults: 2 | actions: 3 | backport: 4 | title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }}) by @{{ author }}" 5 | 6 | queue_rules: 7 | - name: default 8 | merge_method: merge 9 | update_method: rebase 10 | queue_conditions: 11 | # Conditions to get out of the queue (= merged) 12 | - check-success~=/ Ready To Merge$ 13 | 14 | - name: rebase 15 | merge_method: rebase 16 | update_method: rebase 17 | queue_conditions: 18 | # Conditions to get out of the queue (= merged) 19 | - check-success~=/ Ready To Merge$ 20 | 21 | - name: squash 22 | merge_method: squash 23 | update_method: rebase 24 | queue_conditions: 25 | # Conditions to get out of the queue (= merged) 26 | - check-success~=/ Ready To Merge$ 27 | 28 | pull_request_rules: 29 | - name: Merge PRs that are ready 30 | conditions: 31 | - check-success~=/ Ready To Merge$ 32 | - "#approved-reviews-by>=1" 33 | - "#review-requested=0" 34 | - "#changes-requested-reviews-by=0" 35 | - label!=status:block-merge 36 | - label=status:merge-when-green 37 | actions: 38 | queue: 39 | name: default 40 | 41 | - name: Merge (Rebase) PRs that are ready 42 | conditions: 43 | - check-success~=/ Ready To Merge$ 44 | - "#approved-reviews-by>=1" 45 | - "#review-requested=0" 46 | - "#changes-requested-reviews-by=0" 47 | - label!=status:block-merge 48 | - label=status:merge-rebase-when-green 49 | actions: 50 | queue: 51 | name: rebase 52 | 53 | - name: Merge (Squash) PRs that are ready 54 | conditions: 55 | - check-success~=/ Ready To Merge$ 56 | - "#approved-reviews-by>=1" 57 | - "#review-requested=0" 58 | - "#changes-requested-reviews-by=0" 59 | - label!=status:block-merge 60 | - label=status:merge-squash-when-green 61 | actions: 62 | queue: 63 | name: squash 64 | 65 | - name: Delete the PR branch and remove label after merge/close 66 | conditions: 67 | - or: 68 | - merged 69 | - closed 70 | actions: 71 | delete_head_branch: {} 72 | label: 73 | remove: 74 | - "status:merge-when-green" 75 | - "status:merge-rebase-when-green" 76 | - "status:merge-squash-when-green" 77 | 78 | - name: Labeling for Scala Steward PR's 79 | conditions: 80 | - author=scala-steward 81 | actions: 82 | label: 83 | add: [ "type:updates" ] 84 | -------------------------------------------------------------------------------- /.github/workflows/binary-check.yml: -------------------------------------------------------------------------------- 1 | name: Validate Binary Compatibility 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | ref: 7 | type: string 8 | required: false 9 | default: '' 10 | java: 11 | type: string 12 | required: false 13 | default: 17 14 | java-index: 15 | type: string 16 | required: false 17 | default: '' 18 | ignore-job-coursier-cache: 19 | type: boolean 20 | required: false 21 | default: true 22 | extra-coursier-cache-key: 23 | type: string 24 | required: false 25 | default: '' 26 | run-scheduled-in-forks: 27 | type: boolean 28 | required: false 29 | default: false 30 | 31 | jobs: 32 | cmd: 33 | name: JDK ${{ inputs.java }} 34 | if: >- 35 | github.event.repository.fork == false || 36 | github.event_name != 'schedule' || 37 | (github.event_name == 'schedule' && github.event.repository.fork == true && inputs.run-scheduled-in-forks == true) 38 | runs-on: ubuntu-24.04 39 | steps: 40 | - name: Block deprecated repos in /etc/hosts 41 | run: | 42 | sudo echo "127.0.0.1 repo.scala-sbt.org" | sudo tee -a /etc/hosts 43 | sudo echo "127.0.0.1 repo.typesafe.com" | sudo tee -a /etc/hosts 44 | - name: Checkout 45 | uses: actions/checkout@v6 46 | with: 47 | # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves 48 | fetch-depth: 0 49 | ref: ${{ inputs.ref }} 50 | 51 | - name: Coursier Cache 52 | id: coursier-cache 53 | uses: coursier/cache-action@v7 54 | with: 55 | ignoreJob: ${{ inputs.ignore-job-coursier-cache }} 56 | ignoreMatrix: true 57 | extraKey: ${{ inputs.extra-coursier-cache-key }} 58 | 59 | - name: Install Adoptium Temurin OpenJDK 60 | uses: coursier/setup-action@v2 61 | with: 62 | jvm: adoptium:${{ inputs.java }} 63 | jvm-index: ${{ inputs.java-index }} 64 | 65 | - name: Install sbt 66 | uses: sbt/setup-sbt@v1 67 | 68 | - name: Binary Compatibility 69 | run: sbt +mimaReportBinaryIssues 70 | 71 | - name: Cleanup before cache 72 | shell: bash 73 | run: | 74 | find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true 75 | find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true 76 | find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true 77 | find $HOME/.sbt -name "*.lock" -delete || true 78 | -------------------------------------------------------------------------------- /.github/workflows/antora.yml: -------------------------------------------------------------------------------- 1 | name: Generate documentation with Antora 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | path: 7 | type: string 8 | required: false 9 | default: './' 10 | playbook: 11 | type: string 12 | required: false 13 | default: 'local-antora-playbook.yml' 14 | publish: 15 | type: boolean 16 | required: false 17 | default: false 18 | run-scheduled-in-forks: 19 | type: boolean 20 | required: false 21 | default: false 22 | 23 | jobs: 24 | docs: 25 | name: Antora 26 | if: >- 27 | github.event.repository.fork == false || 28 | github.event_name != 'schedule' || 29 | (github.event_name == 'schedule' && github.event.repository.fork == true && inputs.run-scheduled-in-forks == true) 30 | runs-on: ubuntu-24.04 31 | steps: 32 | - name: Block deprecated repos in /etc/hosts 33 | run: | 34 | sudo echo "127.0.0.1 repo.scala-sbt.org" | sudo tee -a /etc/hosts 35 | sudo echo "127.0.0.1 repo.typesafe.com" | sudo tee -a /etc/hosts 36 | - name: Checkout 37 | uses: actions/checkout@v6 38 | with: 39 | # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves 40 | fetch-depth: 0 41 | 42 | - name: Install NodeJS 43 | uses: actions/setup-node@v6 44 | with: 45 | node-version: 20 46 | 47 | - name: Get npm cache directory 48 | id: npm-cache-dir 49 | run: | 50 | echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT 51 | - uses: actions/cache@v5 52 | id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true' 53 | with: 54 | path: ${{ steps.npm-cache-dir.outputs.dir }} 55 | key: ${{ runner.os }}-node-antora@3.1.5-lunr-extension@1.0.0-alpha.8-tabs@1.0.0-beta.6 56 | restore-keys: | 57 | ${{ runner.os }}-node- 58 | 59 | - name: Install Antora and extensions 60 | run: >- 61 | npm i -D -E --quiet --no-progress 62 | @antora/cli@3.1.5 63 | @antora/site-generator@3.1.5 64 | @antora/lunr-extension@1.0.0-alpha.8 65 | @asciidoctor/tabs@1.0.0-beta.6 66 | working-directory: ${{ inputs.path }} 67 | 68 | - name: Build documentation 69 | run: npx antora ${{ inputs.playbook }} 70 | working-directory: ${{ inputs.path }} 71 | 72 | - name: Publish to GitHub Pages 73 | if: ${{ inputs.publish && github.event.repository.fork == false }} 74 | uses: peaceiris/actions-gh-pages@v4 75 | with: 76 | github_token: ${{ secrets.GITHUB_TOKEN }} 77 | publish_dir: ${{ inputs.path }}/build/site 78 | force_orphan: true 79 | commit_message: "Deploy docs" 80 | user_name: 'github-actions[bot]' 81 | user_email: 'github-actions[bot]@users.noreply.github.com' 82 | -------------------------------------------------------------------------------- /.github/release-drafts/base.yml: -------------------------------------------------------------------------------- 1 | name-template: 'Version $RESOLVED_VERSION' 2 | tag-template: '$RESOLVED_VERSION' 3 | filter-by-commitish: true 4 | change-template: '- #$NUMBER $TITLE by @$AUTHOR' 5 | replacers: 6 | - search: ' by @mergify' 7 | replace: '' 8 | template: | 9 | ## Changes 10 | 11 | $CHANGES 12 | 13 | footer: | 14 | 15 | ## :heart: Thanks to our premium sponsors! 16 | 17 |
18 | 19 |
20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | informaticon logo fallback 29 | 30 | 31 | 32 | 33 |
34 | 35 | If you find this OSS project useful for work, please consider asking your company to support it by becoming a sponsor. 36 | You can also individually sponsor the project by becoming a backer. 37 | 38 |
39 | 40 | 41 | 42 |
43 | 44 | ## :bow: Thanks to our contributors 45 | 46 | Finally, thanks to the community for their help with detailed bug reports, discussions about new features and pull request reviews. This project is only possible due to the help we had from amazing contributors. 47 | Special thanks to all code contributors who helped with this particular release (they are listed below)! 48 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | ref: 7 | type: string 8 | required: false 9 | default: '' 10 | java: 11 | type: string 12 | required: false 13 | default: 17 14 | java-index: 15 | type: string 16 | required: false 17 | default: '' 18 | ignore-job-coursier-cache: 19 | type: boolean 20 | required: false 21 | default: true 22 | extra-coursier-cache-key: 23 | type: string 24 | required: false 25 | default: '' 26 | cmd: 27 | type: string 28 | required: false 29 | default: "sbt ci-release" 30 | gradle-build-root: 31 | type: string 32 | required: false 33 | default: "" 34 | 35 | jobs: 36 | cmd: 37 | name: JDK ${{ inputs.java }} 38 | runs-on: ubuntu-24.04 39 | if: ${{ github.event.repository.fork == false }} 40 | steps: 41 | - name: Block deprecated repos in /etc/hosts 42 | run: | 43 | sudo echo "127.0.0.1 repo.scala-sbt.org" | sudo tee -a /etc/hosts 44 | sudo echo "127.0.0.1 repo.typesafe.com" | sudo tee -a /etc/hosts 45 | - name: Checkout 46 | uses: actions/checkout@v6 47 | with: 48 | # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves 49 | fetch-depth: 0 50 | ref: ${{ inputs.ref }} 51 | 52 | - name: Coursier Cache 53 | id: coursier-cache 54 | uses: coursier/cache-action@v7 55 | with: 56 | ignoreJob: ${{ inputs.ignore-job-coursier-cache }} 57 | ignoreMatrix: true 58 | extraKey: ${{ inputs.extra-coursier-cache-key }} 59 | 60 | - name: Gradle Cache 61 | uses: burrunan/gradle-cache-action@v3 62 | with: 63 | build-root-directory: ${{ inputs.gradle-build-root }} 64 | # Disable caching of ~/.gradle/caches/build-cache-* 65 | save-local-build-cache: false 66 | # Disable caching of ~/.m2/repository/ 67 | save-maven-dependencies-cache: false 68 | 69 | - name: Install Adoptium Temurin OpenJDK 70 | uses: coursier/setup-action@v2 71 | with: 72 | jvm: adoptium:${{ inputs.java }} 73 | jvm-index: ${{ inputs.java-index }} 74 | 75 | - name: Install sbt 76 | uses: sbt/setup-sbt@v1 77 | 78 | - name: Publish artifacts 79 | run: ${{ inputs.cmd }} 80 | env: 81 | # Credentials for publishing to Sonatype https://github.com/sbt/sbt-ci-release#secrets 82 | SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} 83 | SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} 84 | # Keys for signing https://github.com/sbt/sbt-ci-release#secrets 85 | PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} 86 | PGP_SECRET: ${{ secrets.PGP_SECRET }} 87 | # Gradle Plugin Portal API Keys https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html 88 | GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} 89 | GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} 90 | 91 | - name: Cleanup before cache 92 | shell: bash 93 | run: | 94 | find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true 95 | find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true 96 | find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true 97 | find $HOME/.sbt -name "*.lock" -delete || true 98 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Contributor guidelines 4 | 5 | ## Reporting issues 6 | 7 | If you wish to report an issue for Play Framework, please ensure you have done the following things: 8 | 9 | * If it is a documentation issue with a simple fix, don't raise an issue, just edit the documentation yourself directly in GitHub and submit a pull request. This will be quicker for you and everybody. 10 | * If you are not 100% sure that it is a bug, then ask about it in the [Play Framework Forum](https://github.com/playframework/playframework/discussions) first. You will get a lot more help a lot quicker in the forum if you raise it there. The issue tracker is for verified bugs, not for questions. 11 | * If you have a feature request, please raise it in the [GitHub Discussion forum](https://github.com/playframework/playframework/discussions) first. The forum is the best place to discuss new features, and it may be that Play already provides something to achieve what you want to achieve and you didn't realise. 12 | * If you are sure you have found a bug, then raise an issue. Please be as specific as possible, including sample code that reproduces the problem, stack traces if there are any exceptions thrown, and versions of Play, OS, Java, etc. 13 | 14 | When the above guidelines are not followed, a Play integrator may close the issue, directing you to the appropriate forum for further discussion. 15 | 16 | ## Contributing changes 17 | 18 | ### Prerequisites 19 | 20 | Before making a contribution, it is important to make sure that the change you wish to make and the approach you wish to take will likely be accepted, otherwise you may end up doing a lot of work for nothing. If the change is only small, for example, if it's a documentation change or a simple bugfix, then it's likely to be accepted with no prior discussion. However, new features, or bigger refactorings should first be discussed in the [Play Framework Forum](https://github.com/playframework/playframework/discussions). 21 | 22 | ### Procedure 23 | 24 | 25 | 1. Ensure that your contribution meets the following guidelines: 26 | 1. Live up to the current code standard: 27 | - Not violate [DRY](https://www.oreilly.com/library/view/97-things-every/9780596809515/ch30.html). 28 | - [Boy Scout Rule](https://www.oreilly.com/library/view/97-things-every/9780596809515/ch08.html) needs to have been applied. 29 | 1. Regardless of whether the code introduces new features or fixes bugs or regressions, it must have comprehensive tests. This includes when modifying existing code that isn't tested. 30 | 1. Each API change must have the corresponding documentation change. The code must be well documented in the project's standard documentation format: 31 | * For Play in general see its [documentation guidelines](https://playframework.com/documentation/latest/Documentation). 32 | * For [Anorm](https://github.com/playframework/anorm) see [its documentation](https://playframework.com/documentation/latest/ScalaAnorm). 33 | * For [Play SOAP](https://playframework.github.io/play-soap/2.x/) see [its documentation](https://playframework.github.io/play-soap/2.x/). 34 | 1. Implementation-wise, the following things should be avoided as much as possible: 35 | * Global state 36 | * Public mutable state 37 | * Implicit conversions 38 | * ThreadLocal 39 | * Locks 40 | * Casting 41 | * Introducing new, heavy external dependencies 42 | 1. The Play API design rules are the following: 43 | * Play is a Java and Scala framework, make sure any changes have feature parity in both the Scala and Java APIs. 44 | * Java APIs should go to `.../src/main/java`, package structure is `play.myapipackage.xxxx` 45 | * Scala APIs should go to `.../src/main/scala`, where the package structure is `play.api.myapipackage` 46 | * However, this does not apply for all projects within the Play Framework GitHub organization, since some only support one of both APIs. 47 | * Features are forever, always think about whether a new feature really belongs to the core framework or if it should be implemented as a module 48 | * Code must conform to standard style guidelines and pass all tests (see [Run tests](https://www.playframework.com/documentation/latest/BuildingFromSource#Run-tests)) 49 | 1. New files must: 50 | * Have a copyright header in the style of 51 | ``` 52 | Copyright (C) from 2022 The Play Framework Contributors , 2011-2021 Lightbend Inc. 53 | ```` 54 | followed by an empty line. 55 | * Not use `@author` tags since it does not encourage [Collective Code Ownership](https://www.extremeprogramming.org/rules/collective.html). 56 | * Usually a repository provides the sbt commands `validateCode` and `formatCode`. Run `sbt validateCode` to ensure all files are formatted and have the copyright header. If you changed docs, please run that command inside the `documentation` folder as well. If validation fails, you can run the `sbt formatCode` command to run all of the various formatters. If the commands are not available you are welcome to open a pull request to add them. 57 | 1. Ensure that your commits are squashed. See [working with git](https://playframework.com/documentation/latest/WorkingWithGit) for more information. 58 | 1. Submit a pull request. 59 | 60 | If the pull request does not meet the above requirements then the code should **not** be merged into main, or even reviewed - regardless of how good or important it is. No exceptions. 61 | 62 | The pull request will be reviewed according to the [implementation decision process](https://playframework.com/community-process#Implementation-decisions). 63 | 64 | ## Backporting policy 65 | 66 | Generally, all bug fixes, improvements and new features will go to the main branch. Backports and other commits to stable branches will only be accepted if they meet the following conditions: 67 | 68 | * The change only affects the documentation 69 | * The change fixes a regression that was introduced in a previous stable release from that branch 70 | * The change fixes a bug that impacts significant number of members of the open source community with no simple work arounds available 71 | * Any other reason the Play steering committee deems appropriate 72 | 73 | All backports and other commits to stable branches, in addition to satisfying the regular contributor guidelines, must also be binary and source compatible with previous releases on that branch. The only exception to this is if a serious bug is impossible to fix without breaking the API, for example, a particular feature is not possible to use due to flaws in the API. 74 | -------------------------------------------------------------------------------- /.github/workflows/cmd.yml: -------------------------------------------------------------------------------- 1 | name: Command with a default JVM, coursier caching and an optional matrix 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | ref: 7 | type: string 8 | required: false 9 | default: '' 10 | java: 11 | type: string 12 | required: false 13 | default: "17" 14 | java-index: 15 | type: string 16 | required: false 17 | default: '' 18 | scala: 19 | type: string 20 | required: false 21 | default: "" 22 | add-dimensions: 23 | type: string 24 | required: false 25 | default: "{}" 26 | include: 27 | type: string 28 | required: false 29 | default: "[]" 30 | exclude: 31 | type: string 32 | required: false 33 | default: "[]" 34 | cmd: 35 | type: string 36 | required: true 37 | env: 38 | type: string 39 | required: false 40 | default: "" 41 | cache-key: 42 | type: string 43 | required: false 44 | default: "" 45 | cache-path: 46 | type: string 47 | required: false 48 | default: "" 49 | ignore-job-coursier-cache: 50 | type: boolean 51 | required: false 52 | default: true 53 | ignore-matrix-coursier-cache: 54 | type: boolean 55 | required: false 56 | default: true 57 | extra-coursier-cache-key: 58 | type: string 59 | required: false 60 | default: '' 61 | run-scheduled-in-forks: 62 | type: boolean 63 | required: false 64 | default: false 65 | gradle-build-root: 66 | type: string 67 | required: false 68 | default: "" 69 | 70 | jobs: 71 | prepare-matrix: 72 | name: Prepare Matrix 73 | if: >- 74 | github.event.repository.fork == false || 75 | github.event_name != 'schedule' || 76 | (github.event_name == 'schedule' && github.event.repository.fork == true && inputs.run-scheduled-in-forks == true) 77 | runs-on: ubuntu-24.04 78 | outputs: 79 | matrix: ${{ steps.prepare-matrix.outputs.matrix }} 80 | steps: 81 | - id: prepare-matrix 82 | run: | 83 | add_dimensions=$(echo -n '${{ inputs.add-dimensions }}' | sed 's/^.*{//;s/}.*$//') # Remove leading { and trailing } 84 | # input java/scala | replace whitespaces/commas/quotes by newline | drop empty | quotation | join by comma 85 | java=$(echo -n '${{inputs.java}}' | sed 's/[[:blank:],"]\+/\n/g' | awk NF | sed 's/^..*$/"&"/' | sed ':a; N; $!ba; s/\n/,/g') 86 | scala=$(echo -n '${{inputs.scala}}' | sed 's/[[:blank:],"]\+/\n/g' | awk NF | sed 's/^..*$/"&"/' | sed ':a; N; $!ba; s/\n/,/g') 87 | matrix="{" 88 | matrix+="\"java\": [$java]," 89 | [[ ! -z "$scala" ]] && matrix+="\"scala\": [$scala]," 90 | matrix+="$(echo ${add_dimensions:+$add_dimensions,})" 91 | matrix+="\"include\":$(echo -n '${{ inputs.include }}')," 92 | matrix+="\"exclude\":$(echo -n '${{ inputs.exclude }}')" 93 | matrix+="}" 94 | # Cleanup JSON (no unnecessary whitespaces, etc.) 95 | matrix=$(jq -n -c "$matrix") 96 | echo $matrix 97 | echo "matrix=$matrix" >> $GITHUB_OUTPUT 98 | cmd: 99 | name: ${{ toJSON(matrix) }} 100 | if: ${{ github.event.repository.fork == false || github.event_name != 'schedule' || (github.event_name == 'schedule' && github.event.repository.fork == true && inputs.run-scheduled-in-forks == true) }} 101 | needs: prepare-matrix 102 | runs-on: ubuntu-24.04 103 | strategy: 104 | # WA: https://github.community/t/reusable-workflow-with-strategy-matrix/205676/6 105 | matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix)}} 106 | steps: 107 | - name: Block deprecated repos in /etc/hosts 108 | run: | 109 | sudo echo "127.0.0.1 repo.scala-sbt.org" | sudo tee -a /etc/hosts 110 | sudo echo "127.0.0.1 repo.typesafe.com" | sudo tee -a /etc/hosts 111 | - name: Checkout 112 | uses: actions/checkout@v6 113 | with: 114 | # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves 115 | fetch-depth: 0 116 | ref: ${{ inputs.ref }} 117 | 118 | - name: Set ENV variables 119 | if: inputs.env != '' 120 | run: echo '${{ inputs.env }}' >> $GITHUB_ENV 121 | 122 | - name: Coursier Cache 123 | id: coursier-cache 124 | uses: coursier/cache-action@v7 125 | with: 126 | ignoreJob: ${{ inputs.ignore-job-coursier-cache }} 127 | ignoreMatrix: ${{ inputs.ignore-matrix-coursier-cache }} 128 | extraKey: ${{ inputs.extra-coursier-cache-key }} 129 | 130 | - name: Gradle Cache 131 | uses: burrunan/gradle-cache-action@v3 132 | with: 133 | build-root-directory: ${{ inputs.gradle-build-root }} 134 | # Disable caching of ~/.gradle/caches/build-cache-* 135 | save-local-build-cache: false 136 | # Disable caching of ~/.m2/repository/ 137 | save-maven-dependencies-cache: false 138 | 139 | - name: Custom Cache 140 | uses: actions/cache@v5 141 | if: ${{ inputs.cache-key != '' && inputs.cache-path != '' }} 142 | with: 143 | key: ${{ format(inputs.cache-key, matrix.java) }} 144 | path: ${{ inputs.cache-path }} 145 | 146 | - name: Install Adoptium Temurin OpenJDK 147 | uses: coursier/setup-action@v2 148 | with: 149 | jvm: adoptium:${{ matrix.java }} 150 | jvm-index: ${{ inputs.java-index }} 151 | 152 | - name: Install sbt 153 | uses: sbt/setup-sbt@v1 154 | 155 | - name: Print helpful configs and files and show environment 156 | run: | 157 | echo "Matrix: ${{ toJSON(matrix) }}" 158 | echo "$ cat /etc/sbt/jvmopts" 159 | cat /etc/sbt/jvmopts || true 160 | echo "" 161 | echo "$ cat /etc/sbt/sbtopts" 162 | cat /etc/sbt/sbtopts || true 163 | echo "" 164 | echo "$ env" 165 | env 166 | echo "ls -alFhR ~/.ivy2 | grep play | grep jar" 167 | ls -alFhR ~/.ivy2 | grep play | grep jar || true 168 | echo "ls -alFhR ~/.cache/coursier | grep play | grep jar" 169 | ls -alFhR ~/.cache/coursier | grep play | grep jar || true 170 | 171 | - name: Convert matrix elements to environment variables 172 | run: | 173 | jq -n -r '$in | to_entries|map("MATRIX_\(.key|ascii_upcase)=\(.value|tostring)")|.[]' --argjson in '${{ toJSON(matrix) }}' >> $GITHUB_ENV 174 | 175 | - name: Run command 176 | run: ${{ inputs.cmd }} 177 | env: 178 | CACHE_HIT_COURSIER: ${{ steps.coursier-cache.outputs.cache-hit-coursier }} 179 | 180 | - name: Cleanup before cache 181 | shell: bash 182 | run: | 183 | find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true 184 | find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true 185 | find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true 186 | find $HOME/.sbt -name "*.lock" -delete || true 187 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Play Framework Code of Conduct 4 | 5 | We are committed to providing a friendly, safe and welcoming environment for all, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity and orientation, or other such characteristics. 6 | 7 | ### Our Standards 8 | 9 | **Whether you’re a regular contributor or a newcomer, we care about making this community a welcoming and safe place for you and we’ve got your back.** 10 | 11 | As a member of the community, you agree to the following: 12 | 13 | **Encouraged:** 14 | 15 | - **Be kind and courteous.** We treat our fellow community members with the empathy, respect and dignity all humans deserve. Keep in mind that public communication is received by many people you don’t know, so before sending a message please ask yourself whether someone from a different context would misunderstand it. 16 | - **Respect differences of opinion** and remember that every design or implementation choice carries a trade-off and numerous costs. There is seldom a single right answer; we will find the best solutions by engaging in constructive discussion, with everybody bringing their unique viewpoint and experience to the table. 17 | - **Remember that everyone was new to Scala at some point.** We want to encourage newcomers to join our community and learn the Scala language and ecosystem. Always assume good intentions and a willingness to learn, just as you are willing to evolve your own opinion as you gain new insights. 18 | 19 | **Discouraged:** 20 | 21 | - Keep unstructured critique to a minimum. We encourage sharing ideas and perspectives, so please ensure that your feedback is constructive and relevant. If you have solid ideas you want to experiment with, make a fork and see how it works. 22 | - Avoid aggressive and micro-aggressive behavior, such as unconstructive criticism, providing corrections that do not improve the conversation, repeatedly interrupting or talking over someone else, feigning surprise at someone’s lack of knowledge or awareness about a topic, or subtle prejudice (for example, comments like “That’s so easy my grandmother could do it.”). For more examples of this kind of behavior, [see the Recurse Center's user manual](https://www.recurse.com/manual#sec-environment). 23 | - We will exclude you from interaction if you insult, demean or harass anyone. See [examples of unacceptable behavior](#examples-of-unacceptable-behavior) below. In particular, we don’t tolerate behavior that excludes people in socially marginalized groups. 24 | - Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member's behavior, please [contact the moderation team](#contact) immediately. 25 | - Likewise any spamming, trolling, flaming, baiting or other attention-stealing behavior is not welcome. 26 | 27 | ### Moderation 28 | 29 | These are the policies for upholding our community’s standards of conduct. If 30 | you feel that a thread needs moderation, please 31 | [contact the moderation team](#contact). 32 | 33 | - Remarks that violate the above code of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful or aggressive manner.) 34 | - Moderators will warn users who make remarks inconsistent with the above code of conduct. 35 | - If the warning is unheeded, the user will be “kicked,” i.e., kicked out of the communication channel to cool off. 36 | - If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded. 37 | - Moderators may choose at their discretion to un-ban the user if it was a first offense and they if they make suitable amends with the offended party. 38 | - If you think a moderator action is unjustified, please take it up with that moderator, or with a different moderator, in private. Complaints about moderation in-channel are not allowed. 39 | - Moderators are held to a higher standard than other community members. If a moderator acts inappropriately, they should expect less leeway than others. 40 | 41 | In the Play Framework community we strive to go the extra step to look out for each 42 | other. Don’t just aim to be technically unimpeachable; try to be your best self. 43 | In particular, avoid exacerbating offensive or sensitive issues, particularly if 44 | they’re off-topic; this all too often leads to unnecessary fights, hurt 45 | feelings, and damaged trust; worse, it can drive people away from the community 46 | entirely. 47 | 48 | If someone takes issue with something you said or did, resist the urge to be 49 | defensive. Rather, stop the offending behavior, apologize, and be sensitive 50 | thereafter. Even if you feel you were misinterpreted or unfairly accused, 51 | chances are good there was something you could’ve communicated better — remember 52 | that it’s your responsibility to make your fellow community members comfortable. 53 | We are all here first and foremost because we want to talk about cool 54 | technology, and everyone wants to get along in doing so. People are generally 55 | eager to assume good intent and forgive. 56 | 57 | ### Domain 58 | 59 | The enforcement policies listed above apply to all official Play Framework channels, including: 60 | 61 | * GitHub discussion forums 62 | * Chat rooms under the "Play Framework" Discord server 63 | * Mailing lists 64 | * GitHub repositories under the [`playframework` organization](https://github.com/playframework) 65 | * Play Framework video streams ([Twitch](https://www.twitch.tv/playframework) and [YouTube](https://www.youtube.com/channel/UCRp6QDm5SDjbIuisUpxV9cg)) 66 | 67 | For other projects adopting the Play Framework Code of Conduct, please contact the maintainers of 68 | those projects for enforcement. If you wish to use this code of conduct for your 69 | own project, consider explicitly mentioning your moderation policy or making a 70 | copy with your own moderation policy so as to avoid confusion. 71 | 72 | ### Contact 73 | 74 | For CoC-related questions or to report possible violations on the channels 75 | listed above, 76 | 77 | * contact one of the moderators active on that channel if you can identify them, or 78 | * send an e-mail to [contact@playframework.com](mailto:contact@playframework.com), which forwards to members of the Play Framework steering committee 79 | * send an e-mail to one of the steering committee members if you want to choose who you are talking to. The current members can by found on [this page](https://www.playframework.com/sponsors). 80 | 81 | ### Examples of unacceptable behavior 82 | 83 | Behavior that will lead to exclusion includes the following points, inspired by the definition of 84 | “Unacceptable Behavior” in the [Citizen Code of Conduct](http://citizencodeofconduct.org/): 85 | 86 | * Violence, threats of violence or violent language directed against another person. 87 | * Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language. 88 | * Posting or displaying sexually explicit or violent material. 89 | * Posting or threatening to post other people’s personally identifying information ("doxing"). 90 | * Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability. 91 | * Inappropriate photography or recording. 92 | * Inappropriate physical contact. You should have someone’s consent before touching them. 93 | * Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances. 94 | * Deliberate intimidation, stalking or following (online or in person). 95 | * Advocating for, or encouraging, any of the above behavior. 96 | * Sustained disruption of community events, including talks and presentations. 97 | 98 | ### Credits 99 | 100 | Identical to the Scala Code of Conduct [as published on 101 | scala-lang.org](https://www.scala-lang.org/conduct/), with Domain and 102 | Contact sections replaced by Play Framework channels and admins. 103 | 104 | Adapted from and/or inspired by multiple successful Codes of Conduct, including: 105 | 106 | * [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct) 107 | * [The Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) 108 | * [The Contributor Covenant v1.4.0](http://contributor-covenant.org/version/1/4/) 109 | * [The Recurse Center's User Manual](https://www.recurse.com/manual#sec-environment) 110 | * [The 18F Code of Conduct](https://18f.gsa.gov/code-of-conduct/) 111 | * [Citizen Code of Conduct](http://citizencodeofconduct.org/) 112 | 113 | ### License 114 | 115 | This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](https://creativecommons.org/licenses/by-sa/3.0/). 116 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Playframework GitHub integration 2 | 3 | [![Twitter Follow](https://img.shields.io/twitter/follow/playframework?label=follow&style=flat&logo=twitter&color=brightgreen)](https://twitter.com/playframework) 4 | [![Discord](https://img.shields.io/discord/931647755942776882?logo=discord&logoColor=white)](https://discord.gg/g5s2vtZ4Fa) 5 | [![GitHub Discussions](https://img.shields.io/github/discussions/playframework/playframework?&logo=github&color=brightgreen)](https://github.com/playframework/playframework/discussions) 6 | [![StackOverflow](https://img.shields.io/static/v1?label=stackoverflow&logo=stackoverflow&logoColor=fe7a16&color=brightgreen&message=playframework)](https://stackoverflow.com/tags/playframework) 7 | [![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) 8 | [![Twitch Status](https://img.shields.io/twitch/status/playframework?logo=twitch&logoColor=white&color=brightgreen&label=live%20stream)](https://www.twitch.tv/playframework) 9 | [![OpenCollective](https://img.shields.io/opencollective/all/playframework?label=financial%20contributors&logo=open-collective)](https://opencollective.com/playframework) 10 | 11 | [![Repository size](https://img.shields.io/github/repo-size/playframework/.github.svg?logo=git)](https://github.com/playframework/.github) 12 | [![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) 13 | [![Mergify Status](https://img.shields.io/endpoint.svg?url=https://api.mergify.com/v1/badges/playframework/.github&style=flat)](https://mergify.com) 14 | 15 | This repository contains a few configurations of GitHub features. For example a [Reusing workflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows) or 16 | [Starter workflows](https://docs.github.com/en/actions/using-workflows/creating-starter-workflows-for-your-organization) as [GitHub Actions](https://docs.github.com/en/actions) features. 17 | 18 | ## GitHub Actions Reusing Workflows 19 | 20 | * [Universal CMD task](#universal-cmd-task) 21 | * [Publishing to Sonatype](#publishing-to-sonatype) 22 | * [Validate Binary Compatibility](#validate-binary-compatibility) 23 | * [Validate Gradle Wrapper](#validate-gradle-wrapper) 24 | * [Mark Pull Request as Ready To Merge](#mark-pull-request-as-ready-to-merge) 25 | * [Generate documentation with Antora](#generate-documentation-with-antora) 26 | 27 | ### Universal CMD task 28 | 29 | This workflow is used for running any CMD task on matrix of Java versions and other dimensions. 30 | 31 | Every matrix dimension will be access by environment variable like `MATRIX_$(uppercase(dimension_name))` (for example `MATRIX_JAVA`). 32 | 33 | 34 | **Path**: [`.github/workflows/cmd.yml`](.github/workflows/cmd.yml) 35 | 36 | **Image**: [Ubuntu 20.04](https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md) 37 | 38 | **Uses actions**: 39 | * [Coursier/Setup Action](https://github.com/coursier/setup-action) 40 | * [Coursier/Cache Action](https://github.com/coursier/cache-action) 41 | 42 | **Parameters**: 43 | 44 | | Parameter | Since | Required | Default | Description | 45 | |------------------------------|-------|--------------------|---------|-------------------------------------------------| 46 | | ref | 2.0.0 | :heavy_minus_sign: | '' | Branch, tag or SHA for checkout | 47 | | cmd | 2.0.0 | :exclamation: | - | Running command | 48 | | java | 2.0.0 | :heavy_minus_sign: | 17 | _AdoptJDK_ version (space/comma delimited list) | 49 | | java-index | 3.3.1 | :heavy_minus_sign: | '' | URL to JVM index source file | 50 | | scala | 2.0.0 | :heavy_minus_sign: | '' | _Scala_ version (space/comma delimited list) | 51 | | add-dimensions | 2.0.0 | :heavy_minus_sign: | '' | Other matrix dimensions (json object) | 52 | | include | 2.0.0 | :heavy_minus_sign: | [] | Matrix include's (json object array) | 53 | | exclude | 2.0.0 | :heavy_minus_sign: | [] | Matrix exclude's (json object array) | 54 | | cache-key | 2.0.0 | :heavy_minus_sign: | '' | Key of custom cache | 55 | | cache-path | 2.0.0 | :heavy_minus_sign: | '' | Path of custom cache | 56 | | env | 2.0.0 | :heavy_minus_sign: | '' | Custom ENV vars | 57 | | run-scheduled-in-forks | 3.1.1 | :heavy_minus_sign: | false | Run by schedule in fork | 58 | | gradle-build-root | 3.3.0 | :heavy_minus_sign: | '' | Directory for Gradle builds | 59 | | ignore-job-coursier-cache | 3.4.0 | :heavy_minus_sign: | true | `ignoreJob` parameter for Coursier Cache | 60 | | ignore-matrix-coursier-cache | 3.4.0 | :heavy_minus_sign: | true | `ignoreMatrix` parameter for Coursier Cache | 61 | | extra-coursier-cache-key | 3.4.0 | :heavy_minus_sign: | '' | `extraKey` parameter for Coursier Cache | 62 | 63 | 64 | **How to use**: 65 | 66 | ```yaml 67 | uses: playframework/.github/.github/workflows/cmd.yml@v3 68 | with: 69 | java: 17, 21 70 | java-index: https://url/of/your/index.json 71 | scala: 2.12.19, 2.13.13, 3.3.1 72 | add-dimensions: >- 73 | { 74 | "color": [ "red", "green"] 75 | } 76 | cmd: sbt "-Dcustom_var=$CUSTOM_VAR" "-Dcolor=$MATRIX_COLOR" "-Djava=$MATRIX_JAVA" ++$MATRIX_SCALA test 77 | env: | 78 | CUSTOM_VAR=value 79 | ``` 80 | 81 | ### Publishing to Sonatype 82 | 83 | This workflow is used for publishing snapshots artifacts to [Sonatype Snapshots](https://oss.sonatype.org/content/repositories/snapshots/com/typesafe/play/) repository or release artifacts to [Maven Central](https://repo1.maven.org/maven2/com/typesafe/play/). 84 | 85 | :warning: For using this workflow project must uses the [CI Release](https://github.com/sbt/sbt-ci-release) plugin. 86 | 87 | **Path**: [`.github/workflows/publish.yml`](.github/workflows/publish.yml) 88 | 89 | **Image**: [Ubuntu 20.04](https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md) 90 | 91 | **Uses actions**: 92 | * [Coursier/Setup Action](https://github.com/coursier/setup-action) 93 | * [Coursier/Cache Action](https://github.com/coursier/cache-action) 94 | 95 | **Parameters**: 96 | 97 | | Parameter | Since | Required | Default | Description | 98 | |---------------------------|-------|--------------------|----------------|------------------------------------------| 99 | | ref | 2.0.0 | :heavy_minus_sign: | '' | Branch, tag or SHA for checkout | 100 | | java | 1.0.0 | :heavy_minus_sign: | 17 | _AdoptJDK_ version | 101 | | java-index | 3.3.1 | :heavy_minus_sign: | '' | URL to JVM index source file | 102 | | cmd | 3.3.0 | :heavy_minus_sign: | sbt ci-release | Running command | 103 | | gradle-build-root | 3.3.0 | :heavy_minus_sign: | '' | Directory for Gradle builds | 104 | | ignore-job-coursier-cache | 3.4.0 | :heavy_minus_sign: | true | `ignoreJob` parameter for Coursier Cache | 105 | | extra-coursier-cache-key | 3.4.0 | :heavy_minus_sign: | '' | `extraKey` parameter for Coursier Cache | 106 | 107 | **How to use**: 108 | 109 | ```yaml 110 | uses: playframework/.github/.github/workflows/publish.yml@v3 111 | ``` 112 | 113 | ### Validate Binary Compatibility 114 | 115 | This workflow is used for validate binary compatibility the current version. 116 | 117 | :warning: For using this workflow project must uses the [SBT MiMa](https://github.com/lightbend/mima) plugin. 118 | 119 | **Path**: [`.github/workflows/binary-check.yml`](.github/workflows/binary-check.yml) 120 | 121 | **Image**: [Ubuntu 20.04](https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md) 122 | 123 | **Uses actions**: 124 | * [Coursier/Setup Action](https://github.com/coursier/setup-action) 125 | * [Coursier/Cache Action](https://github.com/coursier/cache-action) 126 | 127 | **Parameters**: 128 | 129 | | Parameter | Since | Required | Default | Description | 130 | |---------------------------|-------|--------------------|---------|------------------------------------------| 131 | | ref | 2.0.0 | :heavy_minus_sign: | '' | Branch, tag or SHA for checkout | 132 | | java | 1.0.0 | :heavy_minus_sign: | 17 | _AdoptJDK_ version | 133 | | java-index | 3.3.1 | :heavy_minus_sign: | '' | URL to JVM index source file | 134 | | run-scheduled-in-forks | 3.1.1 | :heavy_minus_sign: | false | Run by schedule in fork | 135 | | ignore-job-coursier-cache | 3.4.0 | :heavy_minus_sign: | true | `ignoreJob` parameter for Coursier Cache | 136 | | extra-coursier-cache-key | 3.4.0 | :heavy_minus_sign: | '' | `extraKey` parameter for Coursier Cache | 137 | 138 | **How to use**: 139 | 140 | ```yaml 141 | uses: playframework/.github/.github/workflows/binary-check.yml@v3 142 | ``` 143 | 144 | ### Validate Gradle Wrapper 145 | 146 | This workflow is used to validate the checksums of [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) JAR files present in the source tree and fails if unknown Gradle Wrapper JAR files are found. 147 | 148 | **Path**: [`.github/workflows/gradle-wrapper-validation.yml`](.github/workflows/gradle-wrapper-validation.yml) 149 | 150 | **Image**: [Ubuntu 20.04](https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md) 151 | 152 | **Uses actions**: 153 | * [Gradle/Wrapper Validation Action](https://github.com/gradle/wrapper-validation-action) 154 | 155 | **Parameters**: 156 | 157 | | Parameter | Since | Required | Default | Description | 158 | |------------------------|-------|--------------------|---------|---------------------------------| 159 | | ref | 3.3.0 | :heavy_minus_sign: | '' | Branch, tag or SHA for checkout | 160 | 161 | **How to use**: 162 | 163 | ```yaml 164 | uses: playframework/.github/.github/workflows/gradle-wrapper-validation.yml@v3 165 | ``` 166 | 167 | ### Mark Pull Request as Ready To Merge 168 | 169 | This workflow is used for mark pull request as ready to merge and **should be last** in the workflows chain. 170 | 171 | :warning: For using this workflow don't forget to configure the `needs` ([GA docs](https://docs.github.com/en/actions/using-workflows/advanced-workflow-features#creating-dependent-jobs)) attribute to make this workflow run last. 172 | 173 | **Path**: [`.github/workflows/rtm.yml`](.github/workflows/rtm.yml) 174 | 175 | **Image**: [Ubuntu 20.04](https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md) 176 | 177 | 178 | **No Parameters** 179 | 180 | **How to use**: 181 | 182 | ```yaml 183 | needs: # Should be latest 184 | - "check-code-style" 185 | - "..." 186 | - "tests" 187 | uses: playframework/.github/.github/workflows/rtm.yml@v3 188 | ``` 189 | 190 | ### Generate documentation with Antora 191 | 192 | This workflow is used for generate and optionally publish documentation with [Antora](http://antora.org). 193 | 194 | **Path**: [`.github/workflows/antora.yml`](.github/workflows/antora.yml) 195 | 196 | **Image**: [Ubuntu 20.04](https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md) 197 | 198 | **Uses actions**: 199 | * [Setup Node](https://github.com/actions/setup-node) 200 | * [Cache](https://github.com/actions/cache) 201 | * [GitHub Pages](https://github.com/peaceiris/actions-gh-pages) 202 | 203 | **Parameters**: 204 | 205 | | Parameter | Since | Required | Default | Description | 206 | |------------------------|-------|--------------------|-----------------------------|-------------------------| 207 | | path | 3.1.0 | :heavy_minus_sign: | `./` | Path with docs | 208 | | playbook | 3.1.0 | :heavy_minus_sign: | `local-antora-playbook.yml` | Playbook file name | 209 | | publish | 3.1.0 | :heavy_minus_sign: | false | Publish to GH Pages | 210 | | run-scheduled-in-forks | 3.1.1 | :heavy_minus_sign: | false | Run by schedule in fork | 211 | 212 | **How to use**: 213 | 214 | ```yaml 215 | uses: playframework/.github/.github/workflows/antora.yml@v3 216 | ``` 217 | 218 | ## GitHub Actions Starter workflows 219 | 220 | TODO 221 | -------------------------------------------------------------------------------- /RELEASING.md: -------------------------------------------------------------------------------- 1 | # THIS IS WORK IN PROGRESS 2 | 3 | - [General: Releasing repositories by tag](#) 4 | - [Play Core Repository Release Procedure](#play-release-procedure) 5 | - [Before the release](#before-the-release) 6 | - [Issues and pull request triage](#issues-and-pull-request-triage) 7 | - [Release tracking issue](#release-tracking-issue) 8 | - [Intro](#intro) 9 | - [Prerequisites](#prerequisites) 10 | - [If something goes wrong](#if-something-goes-wrong) 11 | - [Releasing Play](#releasing-play) 12 | - [Step 0 - Release projects that Play depend on (play-json, play-ws, twirl)](#step-0---release-projects-that-play-depends-on-play-json-play-ws-twirl) 13 | - [Step 1 - Release Play itself](#step-1---release-play-itself) 14 | - [Step 2 - Release external modules](#step-2---release-external-modules) 15 | - [Step 3 - Release omnidoc](#step-3---omnidoc) 16 | - [Step 4 - Update `play-samples`](#step-4---update-play-samples) 17 | - [Step 5 - Update playframework.com](#step-5---update-playframeworkcom) 18 | - [Update `.version` in `play-generated-docs`](#update-version-in-play-generated-docs) 19 | - [Update `playReleases.json` and `changelog.md`](#update-playreleasesjson-and-changelogmd) 20 | - [Deploy the website changes](#deploy-the-website-changes) 21 | - [Step 6 - Announce](#step-6---announce) 22 | - [Step 7 - Post release tasks](#step-7---post-release-tasks) 23 | - [sbt-web plugins release procedure](#) 24 | 25 | # General: Releasing repositories by tag 26 | 27 | As of 2022 all repository in the Play Framework GitHub organization are released by tag... 28 | This is released from the `main` branch from `2.9.0` forward. Unless an older version needs patching, then it must be released from the maintenance branch, for instance `2.8.x` branch. If there is no maintenance branch for the release that needs patching, create it from the tag. 29 | 30 | ## Cutting the release 31 | 32 | ### Requires contributor access 33 | 34 | - Check the [draft release notes](https://github.com/playframework/play-json/releases) to see if everything is there 35 | - Wait until [the main build finished](https://github.com/playframework/play-json/actions/workflows/publish.yml) after merging the last PR 36 | - Update the [draft release](https://github.com/playframework/play-json/releases) with the next tag version (eg. `2.9.0`), title and release description 37 | - Check that GitHub Actions release build has executed successfully (GitHub will start a [CI build](https://github.com/playframework/play-json/actions/workflows/publish.yml) for the new tag and publish artifacts to Sonatype) 38 | 39 | ### Requires Sonatype access 40 | 41 | - Go to [Staging repository](https://oss.sonatype.org/#stagingRepositories) and release the concrete staging repository 42 | 43 | ### Check Maven Central 44 | 45 | - The artifacts will become visible at https://repo1.maven.org/maven2/com/typesafe/play/ 46 | 47 | # Play Core Repository Release Procedure 48 | 49 | ## Before the release 50 | 51 | ### Issues and pull request triage 52 | 53 | See if there are [issues that need triage](https://github.com/issues?utf8=%E2%9C%93&q=label%3Atriage+org%3Aplayframework+archived%3Afalse+) and are possibly related to the upcoming release. 54 | This is mainly important if you are doing a minor or major release. 55 | 56 | ## Release tracking issue 57 | 58 | Create a new [release tracking issue](https://github.com/playframework/play-meta/issues/new?template=z_play-release.md). 59 | 60 | ## Intro 61 | 62 | When cutting a release of Play, you need to make the following decision: 63 | 64 | - Does this release of Play require releasing the modules that depend on it, e.g. play-grpc and play-slick. 65 | For a typical minor release, it would not. For a major release, and often for pre releases of major releases, the answer is yes. 66 | 67 | ## Prerequisites 68 | 69 | As of 2022 all repositories in the Play Framework organization are released by tag. That means the sonatype credentials are set up at the GitHub organization level. 70 | To release from older branches however you might still have to release from your machine, that's why you have to set up the sonatype credentials locally. 71 | See [here](https://github.com/xerial/sbt-sonatype#homesbtsbt-version-013-or-10sonatypesbt-1) how that is done (either by setting `credentials +=...` or using the env variable). 72 | 73 | ## If something goes wrong 74 | 75 | The release process pushes all artifacts to maven central and "promote" them automatically. 76 | 77 | If the build fails during or after the promotion of maven central artifacts, there is no going back. 78 | Published artifacts are immutable, they find their way into CDNs, into caches on developer machines, and if there are two different versions of the same artifact out there, this can cause big problems. 79 | Your only option is to fix the problem, and attempt another release of the next version. Remember, version numbers are cheap. 80 | 81 | If the build failed during or before the publishing of artifacts, but not after maven central promotion, you can drop the maven central staging repository. 82 | This can either be done through their corresponding [web interfaces](https://oss.sonatype.org/), or by using the `sonatypeDrop` sbt commands. 83 | 84 | The most common failure is a request timeout. Typically, you can see in the logs that all artifacts have been uploaded and the build fails with a timeout while closing the repository or promoting it. If that's the case, the easiest solution is to close and promote by hand on Sonatype. 85 | 86 | ## Before you release Play 87 | 88 | Check when was the last time scala-steward ran on the repository and consider updating the dependencies yourself. Have a look in the [.scala-steward.conf](https://github.com/playframework/playframework/blob/main/.scala-steward.conf). 89 | 90 | Take this with a grain of salt. It's good and nice to have a release with the latest dependencies, but dependency updates at the last minute can come with surprises. 91 | 92 | ## Releasing Play 93 | 94 | ### Step 0 - Release projects that Play depends on (play-json, play-ws, twirl) 95 | 96 | Prepare the branch for each project: 97 | 98 | - Look for PRs that should be merged. 99 | - Look at `status:needs-backport` issues/PRs (including closed ones). 100 | - Look at issues/PRs tagged milestone version (including closed ones). 101 | - Update any dependencies that are needed. 102 | - Update any upstream projects (e.g make sure new `play-ws` is using new `play-json`) 103 | 104 | May need to release these projects: `play-json`, `play-ws`, `twirl` 105 | 106 | When ready: 107 | 108 | - If the project already has set up `sbt-ci-release`: 109 | - Make sure you are on the latest HEAD of the branch you want to release 110 | - Tag the version you want to release: `git tag -s x.y.z` 111 | - Push the tag to the upstream repo. 112 | - In the GitHub user interface, check "Publish" action, it will publish the release. 113 | - If you release from an older branch that has no `sbt-ci-release` set up yet: 114 | - Make sure you are using **JDK8** to build and release! 115 | - Checkout the branch you want to release and check that the commit you want to release has a green build in CI 116 | - Tag the commit, eg: (`git tag -s x.y.z`). The projects are using `sbt-dynver`, so tagging first is important in order to get the right version number. The projects are NOT using tag prefixes (eg: v1.0.2), they use 1.0.2 instead. Watch-out, don't be mislid by twirl and play-ws. They do have tags prefixed by a `v`, but the dynver config is requiring the new tags to NOT have a prefix. 117 | - Run `sbt release` 118 | - At the end of the release, you must push the tag. 119 | - Check the correcponding release page in GitHub, adapt the release notes as needed and published it. 120 | 121 | ### Step 1 - Release Play itself 122 | 123 | Prepare the branch: 124 | 125 | - Look for PRs that should be merged. 126 | - Look at [`status:needs-backport`](https://github.com/playframework/playframework/issues?utf8=%E2%9C%93&q=label%3Astatus%3Aneeds-backport+) issues/PRs (including closed ones). If you are releasing an older version of Play, look at the `status:needs-backport-x.x` label too. 127 | - Look at issues/PRs tagged milestone version (including closed ones). 128 | - Updated any dependencies that are needed (e.g. Dependencies.scala). 129 | - Do a local build or the appropriate snapshot and use [the `local-test.sh` from `play-samples`](https://github.com/playframework/play-samples/blob/2.8.x/local-test.sh) for a final round of tests. 130 | 131 | When ready: 132 | 133 | - If releasing 2.9 or newer: 134 | - Tag the version you want to release: `git tag -s x.y.z` 135 | - Push the tag to the upstream repo. 136 | - In the GitHub user interface, check "Publish" action, it will publish the release. 137 | - If releasing from `2.8.x`: 138 | - Make sure you are using **JDK8** to build and release. 139 | - Ccheckout the branch you want to release and check that the commit you want to release has a green build in CI 140 | - Tag the commit, eg: (`git tag -s x.y.z`). The projects are using sbt-dynver, so tagging first is important in order to get the right version number. Play is NOT using tag prefixes (eg: v1.0.2), it uses 1.0.2 instead and dynver is configured as such. 141 | - Run `sbt -J-XX:ReservedCodeCacheSize=512m release` 142 | - At the end of the release, you must push the tag. 143 | - Check the corresponding release page in GitHub, adapt the release notes as needed and published it. 144 | 145 | Once Play is released, you need to wait 10 minutes or so for a Maven central sync before you can perform any of the remaining tasks. 146 | 147 | **Verification**: 148 | You can check that the artifacts are available at Maven Central [under `play_`](https://repo1.maven.org/maven2/com/typesafe/play/). 149 | You can see the staged artifacts here on OSS Sonatype. E.g. [here is a search]() for Play 2.8.18 artifacts. 150 | 151 | **Warning**: 152 | After pushing the a tag to GitHub, a GitHub actions workflow will be trigger. 153 | 154 | ### Step 2 - Release external modules 155 | 156 | This includes the modules: 157 | 158 | - play-slick 159 | - play-ebean 160 | - scalatestplus-play 161 | - play-grpc 162 | 163 | Only release these if they need to be released, generally for minor Play releases, there's no reason to cut a new release of these, these libraries are free to have their own release cycle. 164 | 165 | **Note**: since we update omnidoc and the Play templates and seeds people reading the docs or starting a new project will automatically see and use the latest minor versions of all modules, even if we don't patch all modules directly to update dependencies. 166 | 167 | You may need to bump the Play version in the external module, do this, commit, and depending on how major the version bump is, push directly to the repo or go through a pull request. 168 | Once that is done, to release: 169 | 170 | For `play-slick` and `scalatestplus-play`: 171 | 172 | - Make sure you are using **JDK8** to build and release 173 | - Checkout the branch you want to release and check that the commit you want to release has a green build in CI 174 | - Tag the commit, eg: (`git tag -s x.y.z`). The projects are using sbt-dynver, so tagging first is important is important in order to get the right version number. The projects are NOT using tag prefixes (eg: v1.0.2), they use 1.0.2 instead. 175 | - Run `sbt release` 176 | - At the end of the release, you must push the tag. 177 | - Check the correcponding release page in GitHub, adapt the release notes as needed and published it. 178 | 179 | TODO: all of the above should soon become obsolete. All that process should be run by the CI build. 180 | 181 | Again, you will need to wait 10 minutes or so for a Maven central sync before you can perform any of the remaining tasks. 182 | In the meantime you can see the staged artifacts here on OSS Sonatype. E.g. here is a search for Play 2.8.18 artifacts: 183 | 184 | 185 | **Verification**: 186 | You can check that the artifacts are available at Maven Central under `_` or `_2.12_1.0`: 187 | 188 | - 189 | - 190 | 191 | **Verification**: 192 | when you run sbt new playframework/play-{scala,java}-seed.g8 it should pick up the new version on Maven. Try the templates out. You may need to update them if they don't work with the new version of Play. 193 | 194 | ### Step 3 - omnidoc 195 | 196 | **Warning**: 197 | This is a compulsory step and the version X.Y.Z of omnidoc released here must match the version X.Y.Z of Play released in step 1 above. 198 | 199 | Omnidoc builds Play's documentation from all the current versions of Play and its modules. To understand what omnidoc really does under the covers, read the [README](https://github.com/playframework/omnidoc/blob/main/README.md). Note that once omnidoc completed, you will have the docs on the machine where you run the command and you still need to push them to `play-generated-docs` (next step). 200 | 201 | In the omnidoc build file for the branch of Play that you are releasing: 202 | 203 | 1. Update the Play version to the version of Play that you just released, and also 204 | 2. Update any external modules to their latest version that is compatible with that version of Play. 205 | 206 | Here's an example update to the omnidoc 2.8.x branch. 207 | 208 | ```diff 209 | $ git diff 210 | diff --git a/project/OmnidocBuild.scala b/project/OmnidocBuild.scala 211 | - val playVersion = sys.props.getOrElse("play.version", "2.8.0") 212 | + val playVersion = sys.props.getOrElse("play.version", "2.8.1") 213 | ``` 214 | 215 | Push this changes directly to GitHub (no need for a pull request). 216 | 217 | To tag omnidoc: 218 | 219 | - For Play 2.9 we do not need to publish artifacts anymore: 220 | - Just create a tag by using `git tag -s` or the GitHub UI. Make sure you are on the correct branch (where you just set the correct versions described above) 221 | - After the tag was pushed, there will be NO GitHub actions ci workflow run anymore because we do not need to publish artifacts. 222 | - Now locally: Make sure you checked out the tag you just created, make sure the working directoy is clean, so `sbt version` display the version nice (without `-SNAPSHOT` etc.) 223 | - Run `sbt +publishLocal` 224 | - Continue with the play generated docs step below. 225 | - For Play 2.8.x you still have to release by hand and actually publish artifacts: 226 | - make sure you are using **JDK8** to build and release 227 | - checkout the branch you want to release and check that the commit you want to release has a green build in CI 228 | - DO NOT create a tag. Omnidoc does not have a `version.sbt` file and also does not use sbt-dynver. It gets its version from Play. 229 | - run `sbt release` 230 | - at the end of the release, the commit will be tagged and you must push the tag. 231 | - **Verification**: check that the artifacts are available at Maven Central under `play-omnidoc_`. It may take a few minutes. 232 | 233 | Once that is done, you can update the docs on playframework.com, by running: 234 | 235 | Checkout https://github.com/playframework/play-generated-docs and switch to the branch you are releasing. 236 | 237 | In `play-generated-docs` checkout and after switching the branch, eg: 2.8.x, run the following: 238 | 239 | ```sh 240 | rm -rf api/java 241 | rm -rf api/scala 242 | rm -rf manual 243 | rm -rf confs 244 | ``` 245 | 246 | Followed by... 247 | 248 | ```sh 249 | cp -r /target/scala-2.13/omnidoc/javadoc api/java 250 | cp -r /target/scala-2.13/omnidoc/scaladoc api/scala 251 | cp -r /target/scala-2.13/omnidoc/playdoc/manual manual 252 | cp -r /target/scala-2.13/omnidoc/playdoc/confs confs 253 | ``` 254 | 255 | Where `` is the path to the omnidoc repo in your machine that you just released. 256 | 257 | In `play-generated-docs` 258 | 259 | ```shell 260 | git add --all 261 | git commit -m "Documentation for " 262 | git push origin 263 | git tag -sm "Version " 264 | git push origin 265 | ``` 266 | 267 | Where `` is the version you are releasing, eg: 2.8.11 and branch is the branch you are updating eg: 2.8.x 268 | 269 | Verification: check there is a new tag `` at project. It 270 | should be on top of . The website should pick this 271 | tagged version of the generated docs up to 10 minutes later. You can check that then using the following URL 272 | pattern: `https://www.playframework.com/documentation//Home`. For example 273 | . 274 | 275 | ### Step 4 - Update `play-samples` 276 | 277 | Update the Play version (and other released artifacts) in any of the [play-example projects](https://github.com/playframework/play-samples). 278 | 279 | **Verification**: The sample repository builds can be seen at . Make sure the build is green and then merge the pull request. 280 | Only continue the release procedure if the samples pass the test! If they don't it's an indicator the relase might break existing applications! 281 | 282 | ### Step 5 - Update playframework.com 283 | 284 | These are the steps to update website. 285 | 286 | #### Update `.version` in `play-generated-docs` 287 | 288 | If you are releasing a MAJOR version, review the contents of [`.version` in `play-generated-docs`](https://github.com/playframework/play-generated-docs/blob/main/.version) before updating the site. 289 | 290 | #### Update `playReleases.json` and `changelog.md` 291 | 292 | Update `playReleases.json` and `changelog.md` in [playframework.com website git repository](https://github.com/playframework/playframework.com/). 293 | 294 | Note that the changelog should be updated describing all milestone/release candidates for the same release 295 | collectively. In addition the `playReleases.json` should be updated with the development releases in place i.e. 296 | you don't need to publish information on both an M1 and an M2 release. If the release is for the latest stable 297 | or development version, upgrade the website itself to use that version. 298 | 299 | #### Deploy the website changes 300 | 301 | Commit and push your changes. 302 | 303 | **NOTE**: you will need a distinct SSH public key for this. Talk to [Matthias](https://github.com/mkurz) or someone from the steering committee if you don't have access. 304 | 305 | To set up your public key: 306 | 307 | 1. Ask someone else from Play team to give you access the Play secrets. 308 | 2. Download the PEM file and log into the machine: 309 | 310 | ``` 311 | ssh -i PlayProd2015.pem ubuntu@ec2-100-25-201-80.compute-1.amazonaws.com 312 | ``` 313 | 3. `cd playframework.com` 314 | 4. `git pull` 315 | 5. `sbt stage` 316 | 6. Restart the linux service: `sudo systemctl restart playframework.service` 317 | 318 | **Verification**: Check that contains the new release and also if the previous release moved to . 319 | 320 | ### Step 6 - Announce 321 | 322 | 1. If the release contains security fixes post an update on 323 | 1. Publish the release on . There should be a release draft already. 324 | - Make sure to check `[x] Create a discussion for this release` before publishing the release! 325 | 1. Tweet about the new release: https://twitter.com/playframework/ 326 | 1. Post in the LinkedIn group: https://www.linkedin.com/groups/3818467/ 327 | 1. Post an (email) update on the Play Open Collective page: https://opencollective.com/playframework#category-CONNECT 328 | 1. Post an (email) update in the GitHub Sponsors Dashboard https://github.com/sponsors/playframework/dashboard/updates (private link) 329 | 1. Post on Scala Reddit https://www.reddit.com/r/scala/ 330 | 331 | **Tip**: 332 | This shouldn't be necessary anymore because release drafter already adds all the author itself to the release notes, which will the display nicely at the bottom of a release. In case you want to list all the authors that contributed to a release you can use: 333 | 334 | ```bash 335 | git fetch --tags && git shortlog -s 2.8.0..2.8.1 | cut -c8- | sort 336 | ``` 337 | 338 | **Verification**: 339 | * - check the announcement! 340 | * - check the tweet! 341 | 342 | ### Step 7 - Post release tasks 343 | 344 | 1. Close the [milestone](https://github.com/playframework/playframework/milestones) for the release you just made 345 | 1. Create a [new milestone](https://github.com/playframework/playframework/milestones/new) for the next release 346 | 1. Move issues and pull requests from the old milestone to the new one if necessary 347 | 348 | # sbt-web plugins release procedure 349 | 350 | ## Prerequisites 351 | 352 | ### Github 353 | 354 | You'll need the write access to the sbt-web plugin's Github repo. 355 | The easiest way to do this is to be added to the sbt-web team: https://github.com/orgs/sbt/teams/sbt-web. 356 | You can then see all the repos you can publish to (with the `playframework` sonatype user): https://github.com/orgs/sbt/teams/sbt-web/repositories 357 | 358 | In addtion the `playframework` sonatype user can also publish releases for https://github.com/sbt/sbt-eclipse. 359 | You have to join the `sbteclipse` team for that: https://github.com/orgs/sbt/teams/sbteclipse 360 | 361 | ### PGP key 362 | 363 | 1. You'll need to set up a PGP key so that sbt release can sign the artifacts. Signing is done with sbt-pgp. 364 | Read the docs there if you need more info. 365 | 366 | ### Process 367 | 368 | 1. Run `sbt release` 369 | 1. Answer all prompts with defaults - you'll need to provide your PGP passphrase too 370 | 1. After publish has finished update the project's `README.md` to show the latest version. You can do this with Github's online editor and push it. 371 | --------------------------------------------------------------------------------