Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release workflow #827

Merged
merged 12 commits into from
Dec 6, 2023
25 changes: 0 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
Loading