forked from aws/agentcore-cli
-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (36 loc) · 1.14 KB
/
Copy pathpr-tarball.yml
File metadata and controls
38 lines (36 loc) · 1.14 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
name: PR Tarball (Build)
on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
build-tarball:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: '20.x'
cache: 'npm'
- name: Configure git
run: |
git config --global user.email "bedrock-agentcore-npm+ci@amazon.com"
git config --global user.name "CI"
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
- run: npm ci
- run: npm run build --if-present
- run: npm pack
- name: Get tarball info
id: tarball
run: |
TARBALL_NAME=$(ls *.tgz | head -1 | xargs basename)
echo "name=$TARBALL_NAME" >> "$GITHUB_OUTPUT"
- name: Upload tarball as artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: pr-tarball
path: '*.tgz'
retention-days: 30