diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 00000000..ec475e66 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,5 @@ +changelog: + categories: + - title: Changes since the last release + labels: + - "*" diff --git a/.github/workflows/release-eql.yml b/.github/workflows/release-eql.yml new file mode 100644 index 00000000..c962e79e --- /dev/null +++ b/.github/workflows/release-eql.yml @@ -0,0 +1,45 @@ +name: "Release EQL" + +on: + release: + types: + - published + pull_request: # runs everything but the last step + branches: + - main + paths: + - .github/workflows/release-eql.yml + # Useful for debugging + workflow_dispatch: + +defaults: + run: + shell: bash -l {0} + +permissions: + contents: write + +jobs: + build-and-publish: + runs-on: ubuntu-latest + name: Build EQL + if: ${{ github.event_name != 'release' || contains(github.event.release.tag_name, 'eql') }} + timeout-minutes: 5 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install asdf & tools + uses: asdf-vm/actions/install@v3 + + - name: Build EQL release + run: | + just build + mv release/cipherstash-encrypt-dsl.sql release/cipherstash-eql.sql + + - name: Publish EQL release artifacts + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: release/cipherstash-eql.sql diff --git a/.gitignore b/.gitignore index 32632401..09870ec3 100644 --- a/.gitignore +++ b/.gitignore @@ -180,3 +180,6 @@ cipherstash-proxy.toml # turbo repo .turbo + +# build artifacts +release/ diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..185ff653 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +just 1.36.0 diff --git a/README.md b/README.md index c25475d4..8de3f98f 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ EQL provides a data format for transmitting and storing encrypted data & indexes - [Managing indexes with EQL](#managing-indexes-with-eql) - [Data Format](#data-format) - [Helper packages](#helper-packages) +- [Releasing](#releasing) --- @@ -609,3 +610,15 @@ We have created a few langague specific packages to help you interact with the p - [@cipherstash/eql](https://github.com/cipherstash/encrypt-query-language/tree/main/languages/javascript/packages/eql): This is a TypeScript implementation of EQL. - [github.com/encrypt-query-language/go/goeql](https://github.com/cipherstash/encrypt-query-language/tree/main/languages/go/goeql): This is a Go implementation of EQL. + +## Releasing + +To cut a [release](https://github.com/cipherstash/encrypt-query-language/releases) of EQL: + +1. Draft a [new release](https://github.com/cipherstash/encrypt-query-language/releases/new) on GitHub +1. Choose a tag, and create a new one with the prefix `eql-` followed by a [semver](https://semver.org/) (for example, `eql-1.2.3`) +1. Generate the release notes +1. Optionally set the release to be the latest (you can set a release to be latest later on if you are testing out a release first) +1. Click the `Publish release` button + +This will trigger a run of the [Release EQL](https://github.com/cipherstash/encrypt-query-language/actions/workflows/release-eql.yml) workflow, which will build and attach artifacts to the release.