forked from restatedev/restate
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.52 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Create new release
on:
push:
tags:
- v**
jobs:
verify-version:
name: Verify version
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dasel
run: |
wget -q https://github.com/TomWright/dasel/releases/download/v2.3.1/dasel_linux_amd64 && \
mv dasel_linux_amd64 dasel && \
chmod +x dasel && \
./dasel --version
- name: Verify version
run: |
# write yaml to remove quotes
version=$(./dasel --file Cargo.toml --read toml 'workspace.package.version' --write yaml)
tag_version=${{ github.ref_name }}
tag_version=${tag_version#v}
if [ ${tag_version} != ${version} ]; then
echo "::error file=release.yml,line=28::Cargo.toml version '${version}' is not equal to tag version '${tag_version}'. Please align them."
exit 1;
fi
run-tests:
name: Test release
needs: [verify-version]
uses: ./.github/workflows/ci.yml
secrets: inherit
build-docker-image:
name: Build release Docker image
needs: [run-tests]
uses: ./.github/workflows/docker.yml
secrets: inherit
with:
pushToDockerHub: true
create-release:
name: Create release
runs-on: ubuntu-latest
needs: [build-docker-image]
steps:
- name: Create release
uses: softprops/action-gh-release@v1
with:
# create a draft release which needs manual approval
draft: true