-
Notifications
You must be signed in to change notification settings - Fork 16
69 lines (61 loc) · 2.27 KB
/
release-info.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
name: Update Release Info
on:
push:
branches:
- main
paths:
- ".github/workflows/release-info.yml"
- "packages/action-release-info/*"
schedule:
- cron: 0 4 * * *
workflow_dispatch:
concurrency: release-info
jobs:
release-info:
permissions:
contents: read
id-token: write
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Select NodeJS version
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
env:
# renovate: datasource=docker depName=node versioning=node
NODE_VERSION: "20.17.0"
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: yarn install --immutable
- name: Build the release-info action
run: yarn workspace @kitten-science/action-release-info tsc --build
- name: Generate release information
id: release-info
uses: ./packages/action-release-info
with:
filename: release-info.json
repo_token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::022327457572:role/kitten-science-us0-maintainer
role-session-name: GitHubActions
- name: Deploy to S3
run: |
aws s3 cp release-info.json s3://kitten-science-us0
aws s3api put-object \
--bucket kitten-science-us0 \
--key dev.js \
--cache-control "public, s-maxage=60" \
--website-redirect-location "${{ steps.release-info.outputs.dev-url-default }}"
aws s3api put-object \
--bucket kitten-science-us0 \
--key nightly.js \
--cache-control "public, s-maxage=86400" \
--website-redirect-location "${{ steps.release-info.outputs.nightly-url-default }}"
aws s3api put-object \
--bucket kitten-science-us0 \
--key stable.js \
--cache-control "public, s-maxage=86400" \
--website-redirect-location "${{ steps.release-info.outputs.stable-url-default }}"