forked from NVIDIA-NeMo/Curator
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (92 loc) · 3.36 KB
/
Copy pathrelease.yml
File metadata and controls
99 lines (92 loc) · 3.36 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
99
# Copyright (c) 2025-2026, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: "Build, validate, and release NeMo Curator"
on:
push:
branches:
- "main"
- "[rv][0-9].[0-9].[0-9]"
- "[rv][0-9].[0-9].[0-9]rc[0-9]"
- "pull-request/**"
- "deploy-release/*"
workflow_dispatch:
inputs:
release-ref:
description: Ref (SHA or branch name) to release
required: true
type: string
dry-run:
description: Compute the release but do not publish wheel, GH release, or docs.
required: true
default: true
type: boolean
generate-changelog:
description: Generate changelog
required: false
default: true
type: boolean
version-bump-branch:
type: string
required: true
description: Branch to target for version bump
publish-docs:
description: Publish docs
required: false
default: false
type: boolean
defaults:
run:
shell: bash -x -e -u -o pipefail {0}
permissions:
id-token: write
contents: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.event_name }}
cancel-in-progress: ${{ github.event_name == 'push' }}
jobs:
release:
if: '!cancelled()'
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_release_library.yml@v1.4.3
with:
release-ref: ${{ inputs.release-ref || github.sha }}
python-package: nemo_curator
python-version: "3.12"
library-name: NeMo Curator
app-id: ${{ vars.BOT_ID }}
validate-only: ${{ github.event_name != 'workflow_dispatch' }}
dry-run: ${{ inputs.dry-run || false }}
version-bump-branch: ${{ inputs.version-bump-branch || github.ref_name }}
gh-release-use-changelog-builder: ${{ inputs.generate-changelog || true }}
publish-docs: false
restrict-to-admins: true
secrets: inherit # pragma: allowlist secret
release-summary:
needs: [release]
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Result
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
FAILED_JOBS=$(gh run view $GITHUB_RUN_ID --repo ${{ github.repository }} --json jobs --jq '[.jobs[] | select(.conclusion == "failure" or .conclusion == "timed_out" or .conclusion == "action_required")] | length')
if [ "${FAILED_JOBS:-0}" -eq 0 ]; then
echo "✅ All previous jobs completed successfully"
exit 0
else
echo "❌ Found $FAILED_JOBS failed job(s)"
gh run view $GITHUB_RUN_ID --repo ${{ github.repository }} --json jobs --jq '.jobs[] | select(.conclusion == "failure" or .conclusion == "timed_out" or .conclusion == "action_required") | .name'
exit 1
fi