-
Notifications
You must be signed in to change notification settings - Fork 37
88 lines (75 loc) · 2.29 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Build & Release
on:
push:
branches:
- main
tags-ignore:
- nightly
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
uses: ./.github/workflows/.reusable_build.yml
secrets: inherit
build-and-push-test-image-oss:
name: Build and Push Test Image to GHCR - OSS
uses: ./.github/workflows/.reusable_test_image.yml
needs: build
secrets: inherit
build-and-push-test-image-ee:
name: Build and Push Test Image to GHCR - EE
uses: ./.github/workflows/.reusable_test_image.yml
needs: build
secrets: inherit
with:
enterprise: true
e2e-tests-oss:
name: E2E Tests - OSS
needs: build-and-push-test-image-oss
uses: ./.github/workflows/.reusable_e2e_tests_oss.yml
with:
gateway-image: ${{ needs.build-and-push-test-image-oss.outputs.image }}
secrets: inherit
e2e-tests-ee:
name: E2E Tests - EE
needs: build-and-push-test-image-ee
uses: ./.github/workflows/.reusable_e2e_tests_ee.yml
with:
gateway-image: ${{ needs.build-and-push-test-image-ee.outputs.image }}
secrets: inherit
release:
name: Release
runs-on: ${{ vars.RUNS_ON }}
needs: [e2e-tests-oss, e2e-tests-ee]
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PRIVATE_READ }}
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Download assets
timeout-minutes: 5
uses: actions/download-artifact@v4
with:
name: assets
- name: Rename assets
run: mv ./assets.tar.gz ./release.tar.gz
- name: Release non-nightly
if: startsWith(github.ref, 'refs/tags/')
timeout-minutes: 5
env:
GH_TOKEN: ${{ github.token }}
GH_REPOSITORY: ${{ github.repository }}
RELEASE_TAG_NAME: ${{ github.ref_name }} # this is the tag name
RELEASE_TARGET: ${{ github.sha }}
run: bash .ci/release-non-nightly.sh
- name: Release nightly
if: github.ref == 'refs/heads/main'
timeout-minutes: 5
env:
GH_TOKEN: ${{ github.token }}
GH_REPOSITORY: ${{ github.repository }}
RELEASE_TAG_NAME: nightly
RELEASE_TARGET: ${{ github.sha }}
run: bash .ci/release-nightly.sh