Set Version: 0.1.4 #845
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Release" | |
on: | |
push: | |
branches: | |
- release | |
env: | |
ghc_version: "9.6.5" | |
stack_version: "2.15.1" | |
hpack_version: '0.36' | |
jobs: | |
draft-release: | |
name: 'Draft Release' | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.make-release.outputs.version }} | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
- name: 'Make release' | |
id: 'make-release' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
set -x | |
VERSION=v$(cat package/version) | |
gh release create ${VERSION} \ | |
--repo runtimeverification/haskell-backend \ | |
--draft \ | |
--title ${VERSION} \ | |
--target ${{ github.sha }} | |
echo "version=${VERSION}" >> "$GITHUB_OUTPUT" | |
release: | |
name: 'Release' | |
needs: draft-release | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Nix | |
uses: cachix/install-nix-action@v25 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.13.3/install | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
substituters = http://cache.nixos.org https://cache.iog.io | |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= | |
- name: Install Cachix | |
uses: cachix/cachix-action@v14 | |
with: | |
name: k-framework | |
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}' | |
- name: Build | |
run: nix build .#kore-exec .#kore-rpc-booster | |
update-dependents: | |
name: 'Publish Release' | |
runs-on: ubuntu-latest | |
environment: production | |
needs: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VERSION: ${{ needs.draft-release.outputs.version }} | |
steps: | |
- name: 'Finalise release' | |
run: | | |
set -x | |
gh release edit ${VERSION} \ | |
--repo runtimeverification/haskell-backend \ | |
--draft=false | |
- name: 'Update dependents' | |
env: | |
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }} | |
run: | | |
set -x | |
curl --fail \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${GITHUB_TOKEN}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/runtimeverification/devops/dispatches \ | |
-d '{"event_type":"on-demand-test","client_payload":{"repo":"runtimeverification/haskell-backend","version":"'${VERSION}'"}}' |