-
Notifications
You must be signed in to change notification settings - Fork 515
105 lines (101 loc) · 4.22 KB
/
npm-publish-all-packages-canary.yml
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
100
101
102
103
104
105
name: Publish packages to NPM (canary)
on:
push:
branches:
- main
paths:
- 'packages/artillery/**'
- 'packages/artillery-engine-playwright/**'
- 'packages/artillery-engine-posthog/**'
- 'packages/artillery-plugin-apdex/**'
- 'packages/artillery-plugin-ensure/**'
- 'packages/artillery-plugin-expect/**'
- 'packages/artillery-plugin-metrics-by-endpoint/**'
- 'packages/artillery-plugin-publish-metrics/**'
- 'packages/artillery-plugin-fake-data/**'
- 'packages/artillery-plugin-slack/**'
- 'packages/commons/**'
- 'packages/core/**'
- 'packages/skytrace/**'
- 'packages/artillery-plugin-memory-inspector/**'
jobs:
publish-fargate-worker-image:
if: "!contains( github.event.head_commit.message, 'ci: release v')"
uses: ./.github/workflows/docker-ecs-worker-image.yml
permissions:
contents: read
id-token: write
with:
COMMIT_SHA: ${{ github.sha }}
USE_COMMIT_SHA_IN_VERSION: true
SHOULD_BUILD_ARM64: false
secrets:
ECR_WORKER_IMAGE_PUSH_ROLE_ARN: ${{ secrets.ECR_WORKER_IMAGE_PUSH_ROLE_ARN }}
build:
runs-on: ubuntu-latest
if: "!contains( github.event.head_commit.message, 'ci: release v')"
needs: publish-fargate-worker-image
permissions:
contents: read
packages: write
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
outputs:
ARTILLERY_VERSION: ${{ steps.get-artillery-version.outputs.ARTILLERY_VERSION }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
scope: '@artilleryio'
- run: node .github/workflows/scripts/replace-package-versions.js
env:
COMMIT_SHA: ${{ github.sha }}
# It must be published in this specific order to account for order of dependencies (e.g. artillery depends on commons, core, etc), in case failures happen in publishing.
- run: npm -w @artilleryio/int-commons publish --tag canary
- run: npm -w @artilleryio/int-core publish --tag canary
- run: npm -w artillery-plugin-expect publish --tag canary
- run: npm -w artillery-plugin-publish-metrics publish --tag canary
- run: npm -w artillery-plugin-metrics-by-endpoint publish --tag canary
- run: npm -w artillery-plugin-ensure publish --tag canary
- run: npm -w artillery-plugin-apdex publish --tag canary
- run: npm -w artillery-engine-posthog publish --tag canary
- run: npm -w artillery-engine-playwright publish --tag canary
- run: npm -w artillery-plugin-fake-data publish --tag canary
- run: npm -w artillery-plugin-slack publish --tag canary
- run: npm -w artillery publish --tag canary
- id: get-artillery-version
run: |
ARTILLERY_VERSION=$(node -e "console.log(require('./packages/artillery/package.json').version)")
echo "ARTILLERY_VERSION=$ARTILLERY_VERSION" >> $GITHUB_OUTPUT
# Skytrace is a Typescript Package and needs to install -> build -> publish
- run: npm install -w skytrace --ignore-scripts
- run: npm run build -w skytrace
- run: npm -w skytrace publish --tag canary
- run: npm -w artillery-plugin-memory-inspector publish --tag canary
run-distributed-tests:
uses: ./.github/workflows/run-distributed-tests.yml
needs: build
with:
ARTILLERY_VERSION_OVERRIDE: ${{ needs.build.outputs.ARTILLERY_VERSION }}
HAS_ARM64_BUILD: false
permissions:
contents: read
id-token: write
secrets:
ARTILLERY_CLOUD_ENDPOINT_TEST: ${{ secrets.ARTILLERY_CLOUD_ENDPOINT_TEST }}
ARTILLERY_CLOUD_API_KEY_TEST: ${{ secrets.ARTILLERY_CLOUD_API_KEY_TEST }}
DD_TESTS_API_KEY: ${{ secrets.DD_TESTS_API_KEY }}
DD_TESTS_APP_KEY: ${{ secrets.DD_TESTS_APP_KEY }}
AWS_TEST_EXECUTION_ROLE_ARN_TEST5: ${{ secrets.AWS_TEST_EXECUTION_ROLE_ARN_TEST5 }}
publish-cloudformation-templates-canary-to-s3:
uses: ./.github/workflows/s3-publish-cf-templates.yml
needs: run-distributed-tests
with:
canary: true
permissions:
contents: read
id-token: write
secrets:
AWS_ASSET_UPLOAD_ROLE_ARN: ${{ secrets.AWS_ASSET_UPLOAD_ROLE_ARN }}