diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..1f47c8c --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,60 @@ +name: Release + +on: + push: + branches: + - 'main' + +jobs: + release: + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + ocaml-compiler: + - 5.0.x + + runs-on: ${{ matrix.os }} + + env: + ocaml-compiler: '5.1' + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + allow-prerelease-opam: true + + - name: Install + run: | + opam install . --locked --deps-only --with-test --yes + opam install dune-release + + - name: Test + run: | + opam exec -- dune runtest + + - name: Build + run: | + opam exec -- dune build --profile release + + - name: Bump version and create release + shell: bash + env: + DUNE_RELEASE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DUNE_RELEASE_OPAM_REPO: 'pinc-official/opam-repository' + run: | + git pull --tags --force + current_version=$(git describe --tags $(git rev-list --tags --max-count=1)) + IFS='.' read -r major minor patch <<< "$current_version" + new_version="$major.$minor.$((patch + 1))" + + opam exec -- dune-release tag "$new_version" + opam exec -- dune-release distrib + opam exec -- dune-release publish distrib -y + opam exec -- dune-release opam pkg + opam exec -- dune-release opam submit diff --git a/CHANGES b/CHANGES new file mode 100644 index 0000000..42c80fc --- /dev/null +++ b/CHANGES @@ -0,0 +1,3 @@ +# 0.0.1 + +- Initial release diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2a257e1 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Torben Ewert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/pinc-lang.opam.locked b/pinc-lang.opam.locked index 065dff6..2ba517c 100644 --- a/pinc-lang.opam.locked +++ b/pinc-lang.opam.locked @@ -1,6 +1,6 @@ opam-version: "2.0" name: "pinc-lang" -version: "~dev" +version: "dev" synopsis: "The PiNC Language as Syntax and Interpreter" maintainer: "torben@ewert-online.com" authors: "Torben Ewert" @@ -15,23 +15,22 @@ depends: [ "base-unix" {= "base"} "bisect_ppx" {= "2.8.3" & with-test} "cmdliner" {= "1.2.0"} - "containers" {= "3.12"} + "containers" {= "3.13.1"} "crunch" {= "3.3.1"} "csexp" {= "1.5.2"} - "dune" {= "3.10.0"} - "dune-configurator" {= "3.10.0"} + "dune" {= "3.14.2"} + "dune-configurator" {= "3.14.2"} "either" {= "1.0.0"} "fmt" {= "0.9.0"} "ocaml" {= "5.0.0"} "ocaml-compiler-libs" {= "v0.12.4" & with-test} "ocaml-config" {= "3"} "ocaml-system" {= "5.0.0"} - "ocamlbuild" {= "0.14.2"} + "ocamlbuild" {= "0.14.3"} "ocamlfind" {= "1.9.6"} "ppx_derivers" {= "1.2.1" & with-test} - "ppxlib" {= "0.30.0" & with-test} + "ppxlib" {= "0.32.0" & with-test} "ptime" {= "1.1.0"} - "seq" {= "base"} "sexplib0" {= "v0.16.0" & with-test} "stdlib-shims" {= "0.3.0" & with-test} "topkg" {= "1.0.7"}