-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.44 KB
/
release.yml
File metadata and controls
53 lines (48 loc) · 1.44 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
name: Release
on:
push:
tags:
- "v*"
permissions:
id-token: write
contents: read
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Pre-release Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run unit tests
run: nix develop .#ci --command zig build test --summary all
- name: Start OpenSearch
run: nix develop .#ci --command es-start
- name: Run smoke tests
run: nix develop .#ci --command zig build test-smoke --summary all
env:
ES_URL: http://localhost:9200
- name: Run integration tests
run: nix develop .#ci --command zig build test-integration --summary all
env:
ES_URL: http://localhost:9200
- name: Stop OpenSearch
if: always()
run: nix develop .#ci --command es-stop
release:
name: Create Release
needs: test
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref_name, '-rc') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-alpha') }}