-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (89 loc) · 3.04 KB
/
Copy pathrelease.yml
File metadata and controls
98 lines (89 loc) · 3.04 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
name: 'Release'
on:
push:
branches:
- 'main'
jobs:
draft-release:
name: 'Draft Release'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v4
# Drafting logic lives in scripts/deploy.sh so CI and manual releases stay
# in sync (single source of truth). See CONTRIBUTING.md.
- name: 'Draft the release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER_REPO: '${{ github.repository }}'
REV: '${{ github.sha }}'
run: ./scripts/deploy.sh release-draft
nix-cache:
name: 'Populate Nix Caches'
strategy:
matrix:
runner: [normal, ARM64]
runs-on: ${{ matrix.runner }}
needs: draft-release
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
fetch-depth: 0
# The build-and-publish logic lives in scripts/deploy.sh so CI and manual
# deployments stay in sync (single source of truth). See CONTRIBUTING.md.
- name: 'Build and publish komet-node to both Nix caches'
shell: bash
env:
CACHIX_PUBLIC_TOKEN: '${{ secrets.CACHIX_PUBLIC_TOKEN }}'
CACHIX_PRIVATE_KFB_TOKEN: '${{ secrets.CACHIX_PRIVATE_KFB_TOKEN }}'
OWNER_REPO: '${{ github.repository }}'
REV: '${{ github.sha }}'
run: ./scripts/deploy.sh nix-cache
- name: 'On failure, delete drafted release'
if: failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER_REPO: '${{ github.repository }}'
run: ./scripts/deploy.sh release-abort
dockerhub:
name: 'Build and Publish Docker Image'
runs-on: [self-hosted, linux, normal]
needs: draft-release
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
fetch-depth: 0
# Build, smoke-test, and push logic lives in scripts/deploy.sh so CI and
# manual deployments stay in sync (single source of truth). See CONTRIBUTING.md.
- name: 'Build, test, and push Docker image to Docker Hub'
env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
run: ./scripts/deploy.sh docker
- name: 'On failure, delete drafted release'
if: failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER_REPO: '${{ github.repository }}'
run: ./scripts/deploy.sh release-abort
cut-release:
name: 'Cut Release'
runs-on: ubuntu-latest
needs: [dockerhub, nix-cache]
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
fetch-depth: 0
# Finalizing logic lives in scripts/deploy.sh so CI and manual releases
# stay in sync (single source of truth). See CONTRIBUTING.md.
- name: 'Finalize Release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER_REPO: '${{ github.repository }}'
run: ./scripts/deploy.sh release-cut