Set Version: 0.1.33 #311
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: 'Master Push' | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
draft-release: | |
name: 'Draft Release' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
- name: 'Make release' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
set -x | |
VERSION=v$(cat package/version) | |
gh release create ${VERSION} \ | |
--repo runtimeverification/llvm-backend \ | |
--draft \ | |
--title ${VERSION} \ | |
--target ${{ github.sha }} | |
build-jammy-package: | |
name: 'Build Ubuntu Jammy Package' | |
runs-on: [self-hosted, linux, normal] | |
needs: draft-release | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
with: | |
path: k-llvm-jammy | |
submodules: recursive | |
- name: 'Build package in Docker' | |
uses: ./.github/actions/test-package | |
with: | |
os: ubuntu | |
distro: jammy | |
llvm: 15 | |
build-package: package/debian/build-package jammy | |
test-package: package/debian/test-package | |
pkg-name: k-llvm-backend_amd64_ubuntu_jammy.deb | |
- name: 'Upload to release' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
set -x | |
VERSION=v$(cat package/version) | |
cp k-llvm-backend_amd64_ubuntu_jammy.deb k-llvm-backend_${VERSION}_amd64_ubuntu_jammy.deb | |
gh release upload ${VERSION} \ | |
--repo runtimeverification/llvm-backend \ | |
--clobber \ | |
k-llvm-backend_${VERSION}_amd64_ubuntu_jammy.deb | |
- name: 'On failure, delete drafted release' | |
if: failure() | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
set -x | |
VERSION=v$(cat package/version) | |
gh release delete ${VERSION} \ | |
--repo runtimeverification/llvm-backend \ | |
--yes \ | |
--cleanup-tag | |
release: | |
name: 'Publish Release' | |
runs-on: ubuntu-latest | |
environment: production | |
needs: build-jammy-package | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
- name: 'Finalise release' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
set -x | |
VERSION=v$(cat package/version) | |
gh release edit ${VERSION} --draft=false | |
- name: 'Update dependents' | |
env: | |
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }} | |
run: | | |
set -x | |
VERSION=$(cat package/version) | |
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/llvm-backend","version":"'${VERSION}'"}}' |