Skip to content

Commit 5b2b55e

Browse files
committed
misc: refactor artifact size metrics
1 parent 1b9b566 commit 5b2b55e

File tree

3 files changed

+61
-65
lines changed

3 files changed

+61
-65
lines changed

.github/workflows/artifact-size-metrics.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Pull request metrics
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
artifact-size-metrics:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v4
11+
12+
- name: Configure Gradle
13+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
14+
15+
- name: Build
16+
shell: bash
17+
run: |
18+
./gradlew build
19+
./gradlew publishAllPublicationsToTestLocalRepository
20+
21+
- name: Calculate metrics
22+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/artifact-size-metrics/calculate-and-upload@asm-v2 # TODO: Change to main before merging
23+
with:
24+
upload: 'false'
25+
release_metrics: 'false'
26+
27+
- name: Process metrics
28+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/artifact-size-metrics/download-and-process@asm-v2 # TODO: Change to main before merging
29+
with:
30+
download: 'false'
31+
32+
permissions: {}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release metrics
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
jobs:
8+
artifact-size-metrics:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Configure Gradle
15+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
16+
17+
- name: Build
18+
shell: bash
19+
run: |
20+
./gradlew build
21+
./gradlew publishAllPublicationsToTestLocalRepository
22+
23+
- name: Calculate and upload metrics
24+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/artifact-size-metrics/calculate-and-upload@asm-v2 # TODO: Change to main before merging
25+
with:
26+
upload: 'true'
27+
release_metrics: 'true'
28+
29+
permissions: {}

0 commit comments

Comments
 (0)