diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f52b608b8..79d43a056 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,28 +81,3 @@ jobs: uses: getsentry/action-git-diff-suggestions@main with: message: 'The following changes have been made after `make`:' - - make_release: - name: Make package release - runs-on: ubuntu-latest - - if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - persist-credentials: false - - - name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }} - uses: ocaml/setup-ocaml@v2 - with: - allow-prerelease-opam: true - ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }} - dune-cache: true - - - name: Install dependencies - run: opam exec -- make deps - - - name: Run make install - run: opam exec -- make install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..cf41a207e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Release + +on: + workflow_dispatch + +env: + OCAML_DEFAULT_VERSION: 4.14.1 + OPAMYES: true + +jobs: + dune_release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + persist-credentials: false + fetch-depth: 0 + fetch-tags: true + + - name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }} + uses: ocaml/setup-ocaml@v2 + with: + allow-prerelease-opam: true + ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }} + dune-cache: true + + - name: Install dependencies + run: opam exec -- make deps + + - name: Install dune-release + run: opam install dune-release + + - name: Build the distribution archive + run: opam exec -- dune-release distrib + + - name: Upload the artefact + uses: actions/upload-artifact@v3 + with: + name: alt-ergo-${{github.sha}}.tbz + path: _build/alt-ergo-*.tbz