Releasing
The pipeline in
.github/workflows/build.yml
is set up the same way as wirespec's.
Every push and pull request
Every push to main and every pull request runs these jobs:
- Build and test on Linux (JVM, Node.js and Linux native), macOS and Windows.
- Run the smoke test against each build of the server.
- Test the VS Code extension in VS Code, and keep the
.vsixas an artifact. - Build and test the IntelliJ plugin, check it with the plugin verifier of JetBrains against the oldest and the
newest IDE it is for, and keep
dsl-intellij.zipas an artifact. - Test the libraries: the Java library with the rest of the build, the npm package with
npm test. - Build this site.
- Keep the builds of the server as artifacts (
dsl-lsp-linux,dsl-lsp-macosanddsl-lsp-windows), and the jar and the npm package of the libraries (dsl-lang), so a pull request can be tried before it is released.
A release
To release, create a GitHub release of main with a tag such as v0.1.0. The version job takes the version from
the tag, and every build of the run gets it: nothing in the repository holds the version of a release, so there is none to
change before a release. Once the build passes, six jobs publish it.
release-server
Adds the builds of the server that this run tested to the release, with a checksums.txt. These are the files of
Install the language server. The Linux arm64 executable is built on x64, so it is the one
build the pipeline does not run.
release-vscode
Publishes the extension to the Marketplace as dsl-lang.dsl-language, shown as dsl-lang, with the version of the
tag. It uses the VSCODE_TOKEN secret: a Marketplace token of a member of the dsl-lang publisher. The name in
package.json has to be unique in the whole Marketplace, not only within the publisher: dsl and dsl-lang are
taken by other extensions.
release-intellij
Builds the IntelliJ plugin with the version of the tag, adds it to the release as dsl-intellij.zip and publishes
it to the JetBrains Marketplace as community.flock.dsl, shown as dsl-lang. It uses the JETBRAINS_TOKEN secret,
the same as wirespec: a Marketplace token of a member of the vendor that owns the plugin. The plugin is not signed.
The pipeline can only update a plugin the Marketplace knows, so the first version is uploaded by hand, once: build
dsl-intellij.zip with ./gradlew -Pversion=0.1.0 :intellij:buildPlugin and upload it at
plugins.jetbrains.com/plugin/add. JetBrains reviews it before it is
listed. Until then this job fails at its last step, after the zip is added to the release.
release-maven-central
Publishes the Java library as community.flock.dsl:dsl-lang, signed, and releases it without a manual step in the
Central Portal. It uses four secrets, the same as wirespec:
SONATYPE_USERNAMEandSONATYPE_PASSWORD, a user token of central.sonatype.com of an account that may publish under thecommunity.flocknamespace.GPG_PRIVATE_KEYandGPG_PASSPHRASE, the armored private key (gpg --armor --export-secret-keys) and its passphrase. The public key has to be on a key server, such askeys.openpgp.org.
release-npm
Publishes the npm package as @flock/dsl-lang. It uses npm trusted publishing, so it needs no secret: on npmjs.com,
under the settings of the package, the trusted publisher has to be this repository with the workflow build.yml.
A package can only get a trusted publisher once it exists, so the first version is published by hand, once, by a
member of the @flock organization on npm: ./gradlew :npm:npmPackage, then in npm,
npm version 0.0.1 --no-git-tag-version, npm login and npm publish --access public. Do not commit the version:
package.json keeps 0.0.0.
deploy-site
Publishes this site to GitHub Pages. The site shows the version of the release, in the navigation bar
and in the dependencies on the pages of the libraries, so it is published by a release
only, not by a push to main.
Orca
Orca has no pipeline job, as its plugin directory reads
orca-plugin.json from the tagged commit
itself. Orca wants a version in that file, which the pipeline cannot set. It is the version of the Orca plugin,
not of the release: change it when the grammar or the language configuration in editors/orca changes, and leave
it as it is for a release. The repository needs the orca-plugin topic, once, to be listed at
https://orca.dev/plugins/flock-community/dsl-lang.
A release of another branch
A release of another branch gets an RC version, such as 0.1.0-RC.1. The pipeline tags it and publishes the
libraries only: an application asks for a library by its version, and on npm an RC gets the tag rc, so
npm install @flock/dsl-lang keeps giving the latest release of main. The extension, the plugin and the server
are not published: the Marketplaces take stable versions, and releases/latest/download has to give a build of
main. The package.json of the extension and of the npm package keep version 0.0.0, and a build that is not a release
is 0.0.0-SNAPSHOT: the server reports that version, and the site shows it.