Skip to content

Commit 27b4258

Browse files
committed
Merge branch 'main' into 3084-network-limit
2 parents 3aeafbe + 7ca4fbe commit 27b4258

File tree

315 files changed

+12049
-1638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

315 files changed

+12049
-1638
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy GitHub Artifacts
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
download-name:
7+
default:
8+
description: The artifact name to download for checksumming
9+
required: false
10+
type: string
11+
download-pattern:
12+
default:
13+
description: The artifact pattern to download for checksumming
14+
required: false
15+
type: string
16+
upload-name:
17+
default: deploy-artifacts-${{ github.sha }}
18+
description: The artifact name to upload
19+
required: false
20+
type: string
21+
22+
jobs:
23+
deploy-artifacts:
24+
runs-on: ubuntu-24.04
25+
env:
26+
TERM: xterm
27+
steps:
28+
- name: Create paths
29+
run: mkdir -p /tmp/deploy-artifacts/${{ github.sha }}
30+
- name: Download releases
31+
uses: actions/download-artifact@v4
32+
with:
33+
name: ${{ inputs.download-name }}
34+
merge-multiple: true
35+
path: /tmp/deploy-artifacts/${{ github.sha }}
36+
pattern: ${{ inputs.download-pattern }}
37+
- name: Upload releases
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: ${{ inputs.upload-name }}
41+
path: /tmp/deploy-artifacts/${{ github.sha }}/*
42+
if-no-files-found: error

.github/workflows/deploy-npm.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Deploy npm
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
node-version:
7+
default: "20"
8+
description: The node version to use
9+
required: false
10+
type: string
11+
secrets:
12+
github-token:
13+
description: "The github token"
14+
required: true
15+
npm-token:
16+
description: "The npm deploy token"
17+
required: true
18+
19+
jobs:
20+
deploy-npm:
21+
runs-on: ubuntu-24.04
22+
env:
23+
TERM: xterm
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
- name: Install node ${{ inputs.node-version }}
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: ${{ inputs.node-version }}
31+
registry-url: https://registry.npmjs.org
32+
cache: npm
33+
- name: Install dependencies
34+
run: npm clean-install --prefer-offline --frozen-lockfile
35+
- name: Lint code
36+
run: npm run lint
37+
- name: Run unit tests
38+
run: npm run test:unit
39+
- name: Update edge release alias
40+
shell: bash
41+
run: |
42+
if ./scripts/semcompare.sh "${{ github.event.release.tag_name }}" "$(cat ./release-aliases/3-EDGE)"; then
43+
echo "${{ github.event.release.tag_name }}" > ./release-aliases/3-EDGE
44+
fi
45+
- name: Update stable release alias
46+
shell: bash
47+
if: github.event.release.prerelease == false
48+
run: |
49+
if ./scripts/semcompare.sh "${{ github.event.release.tag_name }}" "$(cat ./release-aliases/3-STABLE)"; then
50+
echo "${{ github.event.release.tag_name }}" > ./release-aliases/3-STABLE
51+
fi
52+
- name: Prepare Release
53+
uses: lando/prepare-release-action@v3
54+
with:
55+
lando-plugin: true
56+
sync-token: ${{ secrets.github-token }}
57+
sync-email: rtfm47@lando.dev
58+
sync-username: rtfm-47
59+
- name: Publish to npm
60+
run: |
61+
VERSION=$(node -p "require('./package.json').version")
62+
PACKAGE=$(node -p "require('./package.json').name")
63+
64+
if [ "${{ github.event.release.prerelease }}" == "false" ]; then
65+
npm publish --access public --dry-run
66+
npm publish --access public
67+
npm dist-tag add "$PACKAGE@$VERSION" edge
68+
69+
echo "::notice title=Published $VERSION to $PACKAGE::This is a stable release published to the default 'latest' npm tag"
70+
echo "::notice title=Updated latest tag to $VERSION::The stable tag now points to $VERSION"
71+
echo "::notice title=Updated edge tag to $VERSION::The edge tag now points to $VERSION"
72+
else
73+
npm publish --access public --tag edge --dry-run
74+
npm publish --access public --tag edge
75+
76+
echo "::notice title=Published $VERSION to $PACKAGE::This is a prerelease published to the 'edge' npm tag"
77+
echo "::notice title=Updated edge tag to $VERSION::The edge tag now points to $VERSION"
78+
fi
79+
env:
80+
NODE_AUTH_TOKEN: ${{ secrets.npm-token }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy GitHub Artifacts
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
download-name:
7+
default:
8+
description: The artifact name to download for checksumming
9+
required: false
10+
type: string
11+
download-pattern:
12+
default:
13+
description: The artifact pattern to download for checksumming
14+
required: false
15+
type: string
16+
17+
jobs:
18+
deploy-releases:
19+
runs-on: ubuntu-24.04
20+
env:
21+
TERM: xterm
22+
steps:
23+
- name: Create paths
24+
run: mkdir -p /tmp/deploy-releases/${{ github.sha }}
25+
- name: Download releases
26+
uses: actions/download-artifact@v4
27+
with:
28+
name: ${{ inputs.download-name }}
29+
merge-multiple: true
30+
path: /tmp/deploy-releases/${{ github.sha }}
31+
pattern: ${{ inputs.download-pattern }}
32+
- name: Upload releases to GitHub Releases
33+
uses: softprops/action-gh-release@v2
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
with:
37+
files: /tmp/deploy-releases/${{ github.sha }}/*
38+
fail_on_unmatched_files: true

.github/workflows/deploy-s3.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy S3
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
download-name:
7+
default:
8+
description: The artifact name to download for checksumming
9+
required: false
10+
type: string
11+
download-pattern:
12+
default:
13+
description: The artifact pattern to download for checksumming
14+
required: false
15+
type: string
16+
secrets:
17+
aws-access-key-id:
18+
description: "The aws access key id"
19+
required: true
20+
aws-secret-access-key:
21+
description: "The aws secret access key"
22+
required: true
23+
aws-region:
24+
description: "The aws region"
25+
required: false
26+
27+
jobs:
28+
deploy-s3:
29+
runs-on: ubuntu-24.04
30+
env:
31+
TERM: xterm
32+
steps:
33+
- name: Create paths
34+
run: mkdir -p /tmp/deploy-s3/${{ github.sha }}
35+
- name: Download releases
36+
uses: actions/download-artifact@v4
37+
with:
38+
name: ${{ inputs.download-name }}
39+
merge-multiple: true
40+
path: /tmp/deploy-s3/${{ github.sha }}
41+
pattern: ${{ inputs.download-pattern }}
42+
- name: Configure S3 Credentials
43+
uses: aws-actions/configure-aws-credentials@v4
44+
with:
45+
aws-access-key-id: ${{ secrets.aws-access-key-id }}
46+
aws-secret-access-key: ${{ secrets.aws-secret-access-key }}
47+
aws-region: us-east-1
48+
- name: Upload releases to S3
49+
shell: bash
50+
run: |
51+
aws s3 sync /tmp/deploy-s3/${{ github.sha }} s3://files.lando.dev
52+
aws s3 sync /tmp/deploy-s3/${{ github.sha }} s3://files.lando.dev/cli
53+
aws s3 sync /tmp/deploy-s3/${{ github.sha }} s3://files.lando.dev/core

.github/workflows/dev-release-cli.yml

Lines changed: 0 additions & 166 deletions
This file was deleted.

0 commit comments

Comments
 (0)