Skip to content

Commit 842a7b6

Browse files
author
Mark R. Tuttle
committed
Add release workflow
1 parent 0261c47 commit 842a7b6

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/release.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release CBMC proof debugger
2+
3+
# A new release is triggered by a new tag of the form debugger-VERSION.
4+
5+
# GitHub has deprecated actions/create-release
6+
# https://github.com/actions/create-release
7+
#
8+
# GitHub recommends four actions including
9+
# softprops/action-gh-release is highly rated but includes deprecated code
10+
# https://github.com/softprops/action-gh-release
11+
# ncipollo/release-action@v1
12+
# https://github.com/ncipollo/release-action
13+
14+
on:
15+
push:
16+
tags:
17+
- debugger-*
18+
19+
jobs:
20+
Release:
21+
name: Release proof debugger
22+
runs-on: ubuntu-latest
23+
steps:
24+
25+
- name: Checkout repository
26+
uses: actions/checkout@v3
27+
28+
- name: Get version numbers
29+
run: |
30+
# The environment variable GITHUB_REF is refs/tags/debugger-*
31+
echo "PACKAGE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV
32+
echo "TAG_VERSION=$(echo ${{ github.ref }} | cut -d "/" -f 3 | cut -d "-" -f 2)" >> $GITHUB_ENV
33+
- name: Compare version numbers
34+
run: |
35+
if [[ ${{ env.PACKAGE_VERSION }} != ${{ env.TAG_VERSION }} ]]; then
36+
echo "Package version ${{env.PACKAFGE_VERSION}} does not match tag version ${{env.TAG_VERSION}}"
37+
exit 1
38+
fi
39+
40+
- name: Create package
41+
run: make setup-ubuntu package
42+
43+
- name: Create release
44+
uses: ncipollo/release-action@v1
45+
with:
46+
artifacts: "*.vsix"
47+
artifactContentType: application/zip
48+
body: |
49+
This release is CBMC Proof Debugger version ${{ env.TAG_VERSION }}. For the latest release, go to the [Marketplace](https://marketplace.visualstudio.com/vscode) for Visual Studio Code extensions.
50+
51+
To install this release, download the package `proof-debugger-${{ env.TAG_VERSION }}.vsix` below and install it with
52+
53+
```
54+
code --install-extension proof-debugger-${{ env.TAG_VERSION }}.vsix
55+
```

0 commit comments

Comments
 (0)