Skip to content
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
3 changes: 3 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

- [ ] `CHANGELOG.md`'s "Unreleased" section has been updated, if applicable.
25 changes: 0 additions & 25 deletions .github/workflows/PR.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/SNAPSHOT.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: build

on:
pull_request: {}
workflow_dispatch: {}
push:
branches:
- 'master'
tags-ignore:
- '**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version-file: .github/workflows/.java-version
- uses: gradle/actions/setup-gradle@v4

- run: ./gradlew build dokkaHtmlMultiModule

- run: ./gradlew publish
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'sqldelight/sql-psi' }}
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME_APP_CASH }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD_APP_CASH }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SECRET_PASSPHRASE }}

- name: Deploy docs to website
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have docs now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They're at least generated. Not sure how useful they are...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if: ${{ github.ref == 'refs/heads/master' && github.repository == 'sqldelight/sql-psi' }}
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: site
FOLDER: build/dokka/htmlMultiModule
TARGET_FOLDER: docs/latest/
CLEAN: true
48 changes: 48 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: release

on:
push:
tags:
- '**'

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version-file: .github/workflows/.java-version
- uses: gradle/actions/setup-gradle@v4

- run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME_APP_CASH }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD_APP_CASH }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SECRET_PASSPHRASE }}

- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v2
with:
release_notes_file: RELEASE_NOTES.md

- name: Create GitHub release
run: gh release create ${{ github.ref_name }} --notes-file RELEASE_NOTES.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: ./gradlew dokkaHtmlMultiModule

- name: Deploy docs to website
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: site
FOLDER: build/dokka/htmlMultiModule
TARGET_FOLDER: docs/1.x/
CLEAN: true
89 changes: 89 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Change Log

## Unreleased

Nothing yet!

## 0.4.10

## 0.4.9

## 0.4.8

## 0.4.7

## 0.4.6

## 0.4.5

## 0.4.4

## 0.4.3

## 0.4.2

## 0.4.1

## 0.4.0

## 0.3.17

## 0.3.15

## 0.3.14

## 0.3.12

## 0.3.11

## 0.3.10

## 0.3.9

## 0.3.8

## 0.3.7

## 0.3.6

## 0.3.5

## 0.3.4

## 0.3.3

## 0.3.2

## 0.3.1

## 0.3.0

## 0.2.4

## 0.2.3

## 0.2.2

## 0.2.1

## 0.2.0

## 0.1.9

## 0.1.8

## 0.1.7

## 0.1.6

## 0.1.5

## 0.1.4

## 0.1.3

## 0.1.2

## 0.1.1

## 0.1.0
50 changes: 31 additions & 19 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
Releasing
=========
# Releasing

1. Change the version in `gradle.properties` to a non-SNAPSHOT verson.
2. Update the `CHANGELOG.md` for the impending release.
3. Update the `README.md` with the new version.
4. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
5. `./gradlew clean publish --no-parallel`.
6. Visit [Sonatype Nexus](https://oss.sonatype.org/) and promote the artifact.
7. `git tag -a X.Y.Z -m "Version X.Y.Z"` (where X.Y.Z is the new version)
8. Update the `gradle.properties` to the next SNAPSHOT version.
9. `git commit -am "Prepare next development version."`
10. `git push && git push --tags`
11. Update the sample app to the release version and send a PR.
1. Update the `VERSION_NAME` in `gradle.properties` to the release version.

If step 6 or 7 fails, drop the Sonatype repo, fix the problem, commit, and start again at step 5.
2. Update the `CHANGELOG.md`:
1. Change the `Unreleased` header to the release version.
2. Add a link URL to ensure the header link works.
3. Add a new `Unreleased` section to the top.

3. Commit

Prerequisites
-------------
```
$ git commit -am "Prepare version X.Y.Z"
```

In `~/.gradle/gradle.properties`, set the following:
4. Tag

* `SONATYPE_NEXUS_USERNAME` - Sonatype username for releasing to `com.squareup`.
* `SONATYPE_NEXUS_PASSWORD` - Sonatype password for releasing to `com.squareup`.
```
$ git tag -am "Version X.Y.Z" X.Y.Z
```

5. Update the `VERSION_NAME` in `gradle.properties` to the next "SNAPSHOT" version.

6. Commit

```
$ git commit -am "Prepare next development version"
```

7. Push!

```
$ git push && git push --tags
```

This will trigger a GitHub Action workflow which will create a GitHub release and upload the
release artifacts to Maven Central.
7 changes: 1 addition & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.kotlinJvm) apply false
alias(libs.plugins.spotless)
alias(libs.plugins.mavenPublish)
alias(libs.plugins.mavenPublish) apply false
alias(libs.plugins.dokka)
}

Expand All @@ -29,14 +29,9 @@ allprojects {
maven { url "https://cache-redirector.jetbrains.com/intellij-dependencies" }
maven { url "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide-plugin-dependencies" }
}

group = GROUP
version = VERSION_NAME
}

subprojects {
apply(plugin: "org.jetbrains.kotlin.jvm")

tasks.withType(JavaCompile).configureEach {
sourceCompatibility = '11'
targetCompatibility = '11'
Expand Down
4 changes: 2 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.grammarKitComposer)
alias(libs.plugins.mavenPublish)
alias(libs.plugins.dokka)
id("java-test-fixtures")
}

apply from: "$rootDir/gradle/gradle-mvn-push.gradle"

grammarKit {
intellijRelease.set(libs.versions.ideaVersion)
}
Expand Down
4 changes: 2 additions & 2 deletions environment/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.mavenPublish)
alias(libs.plugins.dokka)
}

apply from: "$rootDir/gradle/gradle-mvn-push.gradle"

dependencies {
implementation projects.core
compileOnly libs.bundles.intelliJ
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ POM_DEVELOPER_URL=https://github.com/cashapp
SONATYPE_HOST=DEFAULT
SONATYPE_AUTOMATIC_RELEASE=true
RELEASE_SIGNING_ENABLED=true

org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8
10 changes: 0 additions & 10 deletions gradle/gradle-mvn-push.gradle

This file was deleted.