-
Notifications
You must be signed in to change notification settings - Fork 27
65 lines (64 loc) · 2.16 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
60
61
62
63
64
65
name: release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
workflow_dispatch:
jobs:
release:
runs-on: self-hosted
steps:
- name: Checkout coreum
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build binaries
run: make release
- name: Build and publish images
run: make release-images
- name: Check Tag
id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo ::set-output name=release::true
fi
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+-rc.*$ ]]; then
echo ::set-output name=release_candidate::true
fi
- name: Link released binaries under right names
run: |
ln bin/.cache/cored/docker.linux.amd64/bin/cored cored-linux-amd64
ln bin/.cache/cored/docker.linux.arm64/bin/cored cored-linux-arm64
ln bin/.cache/cored/docker.darwin.amd64/bin/cored cored-darwin-amd64
ln bin/.cache/cored/docker.darwin.arm64/bin/cored cored-darwin-arm64
sha256sum cored-* > checksums.txt
- name: Create release
if: steps.check-tag.outputs.release == 'true'
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
generate_release_notes: true
files: |
cored-linux-amd64
cored-linux-arm64
cored-darwin-amd64
cored-darwin-arm64
checksums.txt
- name: Create release candidate
if: steps.check-tag.outputs.release_candidate == 'true'
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
generate_release_notes: true
files: |
cored-linux-amd64
cored-linux-arm64
cored-darwin-amd64
cored-darwin-arm64
checksums.txt