-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (74 loc) · 2.14 KB
/
release.yaml
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
name: Release
on:
workflow_dispatch:
inputs:
dry_run:
type: boolean
description: 'Dry run. Compute release version only'
default: false
run_integration_tests:
type: boolean
description: 'Run integration tests'
default: true
jobs:
version:
name: Compute release version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.dryrun.outputs.release-version }}
tag: ${{ steps.dryrun.outputs.release-channel == "main" && "latest" || steps.dryrun.outputs.release-channel }}
permissions:
contents: write
steps:
- name: checkout
uses: actions/checkout@v4
- name: dryrun
id: dryrun
uses: ahmadnassri/action-semantic-release@v2
with:
config: ${{ github.workspace }}/.releaserc.json
dry: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
push:
needs: version
if: ${{ !inputs.dry_run && needs.version.outputs.version != '' }}
uses: ./.github/workflows/push.yaml
secrets: inherit
with:
run_integration_tests: ${{ inputs.run_integration_tests }}
release_version: ${{ needs.version.outputs.version }}
publish:
needs: [version, push]
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tag release
id: build
if: ${{ needs.version.outputs.tag != '' }}
run: |
make tag
env:
MAKEFLAGS: "-j 4 --output-sync=target"
S3_BUCKET_PREFIX: "observeinc-"
RELEASE_VERSION: "${{ needs.version.outputs.version }}"
TAG: ${{ needs.version.outputs.tag }}
- name: Cut release
id: release
uses: ahmadnassri/action-semantic-release@v2
with:
config: ${{ github.workspace }}/.releaserc.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete older pre-releases
uses: dev-drprasad/delete-older-releases@v0.3.4
with:
keep_latest: 0
delete_tags: true
delete_prerelease_only: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}