Skip to content

Bump version numbers to v2.1.1 #17

Bump version numbers to v2.1.1

Bump version numbers to v2.1.1 #17

Workflow file for this run

name: Kind 2 Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*'
jobs:
kind2-linux-bin:
if: github.repository == 'kind2-mc/kind2'
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: network=host
- name: Build and push to local registry
uses: docker/build-push-action@v3
with:
file: docker/Dockerfile
context: ./
target: builder
push: true
tags: localhost:5000/name/kind2:latest
- name: Extract kind 2 binary
id: extract
uses: shrink/actions-docker-extract@v2
with:
image: localhost:5000/name/kind2:latest
path: /home/opam/kind2-build/bin/kind2
- name: Upload kind2 binary
uses: actions/upload-artifact@v3
with:
path: ${{ steps.extract.outputs.destination }}
name: linux
kind2-macos-bin:
if: github.repository == 'kind2-mc/kind2'
strategy:
matrix: # Single configuration
ocaml-version: [ 4.14.1 ]
# Only matrix variables can be used at runs-on
os: [ macos-12 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up OCaml ${{ matrix.ocaml-version }}+flambda
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ocaml-variants.${{ matrix.ocaml-version }}+options,ocaml-option-flambda
- name: Install Kind2 OCaml dependencies
run: opam install -y . --deps-only
- name: Build Kind 2
run: opam exec make static
- name: Strip binary
run: strip bin/kind2
- name: Upload Kind 2 binary
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: bin/kind2
create-new-release:
if: github.repository == 'kind2-mc/kind2'
runs-on: ubuntu-latest
needs: [kind2-linux-bin, kind2-macos-bin]
steps:
- name: Create new release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cat > Release_Notes.txt << EOF
TODO:
- Generate and upload user_documentation.pdf
- Replace this text with the release notes
- Publish the release!"
EOF
gh release create $GITHUB_REF_NAME --verify-tag --draft \
--title "Kind 2 $GITHUB_REF_NAME" --notes-file Release_Notes.txt \
--repo $GITHUB_REPOSITORY
upload-artifact:
if: github.repository == 'kind2-mc/kind2'
runs-on: ubuntu-latest
needs: [create-new-release]
strategy:
matrix:
version: [linux, macos-12]
steps:
- name: Download binary
uses: actions/download-artifact@v3
with:
name: ${{ matrix.version }}
- name: Create tar.gz file
id: create_tarball
run: |
chmod u+x kind2
version=$GITHUB_REF_NAME
tarball=kind2-$version-${{ matrix.version }}-x86_64.tar.gz
tar -czf $tarball kind2
echo "filename=$tarball" >> $GITHUB_OUTPUT
- name: Upload release asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload $GITHUB_REF_NAME \
${{ steps.create_tarball.outputs.filename }} \
--repo $GITHUB_REPOSITORY