Skip to content

Commit b239850

Browse files
committed
Split build to separate trigger
1 parent a17eef7 commit b239850

File tree

2 files changed

+57
-51
lines changed

2 files changed

+57
-51
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Development Build
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python: ["3.9"]
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python }}
22+
- name: Install dependencies
23+
run: pip install tox
24+
- name: Build the package
25+
run: |
26+
export GUIDELLM_BUILD_TYPE=dev
27+
export GUIDELLM_BUILD_ITERATION=${{ github.event.pull_request.number }}
28+
tox -e build
29+
- name: Upload build artifacts
30+
id: artifact-upload
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: build-artifacts
34+
path: dist/*
35+
compression-level: 6
36+
if-no-files-found: error
37+
retention-days: 30
38+
- name: Generate GitHub App token
39+
id: app-token
40+
uses: actions/create-github-app-token@v1
41+
with:
42+
app-id: ${{ secrets.GH_NM_REDHAT_AUTOMATION_APP_ID }}
43+
private-key: ${{ secrets.GH_NM_REDHAT_AUTOMATION_APP_PRIVATE_KEY }}
44+
- name: Comment Install instructions
45+
uses: actions/github-script@v7
46+
with:
47+
github-token: ${{ steps.app-token.outputs.token }}
48+
script: |
49+
github.rest.issues.createComment({
50+
issue_number: context.issue.number,
51+
owner: context.repo.owner,
52+
repo: context.repo.repo,
53+
body: `📦 **Build Artifacts Available**
54+
The build artifacts (\`.whl\` and \`.tar.gz\`) have been successfully generated and are available for download: ${{ steps.artifact-upload.outputs.artifact-url }}.
55+
They will be retained for **up to 30 days**.
56+
`
57+
})

.github/workflows/development.yml

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -154,54 +154,3 @@ jobs:
154154

155155
- name: Run integration tests
156156
run: npm run test:integration
157-
158-
build:
159-
runs-on: ubuntu-latest
160-
strategy:
161-
matrix:
162-
python: ["3.9"]
163-
steps:
164-
- name: Checkout code
165-
uses: actions/checkout@v4
166-
with:
167-
fetch-depth: 0
168-
- name: Set up Python
169-
uses: actions/setup-python@v5
170-
with:
171-
python-version: ${{ matrix.python }}
172-
- name: Install dependencies
173-
run: pip install tox
174-
- name: Build the package
175-
run: |
176-
export GUIDELLM_BUILD_TYPE=dev
177-
export GUIDELLM_BUILD_ITERATION=${{ github.event.pull_request.number }}
178-
tox -e build
179-
- name: Upload build artifacts
180-
id: artifact-upload
181-
uses: actions/upload-artifact@v4
182-
with:
183-
name: build-artifacts
184-
path: dist/*
185-
compression-level: 6
186-
if-no-files-found: error
187-
retention-days: 30
188-
- name: Generate GitHub App token
189-
id: app-token
190-
uses: actions/create-github-app-token@v1
191-
with:
192-
app-id: ${{ secrets.GH_NM_REDHAT_AUTOMATION_APP_ID }}
193-
private-key: ${{ secrets.GH_NM_REDHAT_AUTOMATION_APP_PRIVATE_KEY }}
194-
- name: Comment Install instructions
195-
uses: actions/github-script@v7
196-
with:
197-
github-token: ${{ steps.app-token.outputs.token }}
198-
script: |
199-
github.rest.issues.createComment({
200-
issue_number: context.issue.number,
201-
owner: context.repo.owner,
202-
repo: context.repo.repo,
203-
body: `📦 **Build Artifacts Available**
204-
The build artifacts (\`.whl\` and \`.tar.gz\`) have been successfully generated and are available for download: ${{ steps.artifact-upload.outputs.artifact-url }}.
205-
They will be retained for **up to 30 days**.
206-
`
207-
})

0 commit comments

Comments
 (0)