Update Release Info #1215
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Release Info | |
on: | |
workflow_call: | |
workflow_dispatch: | |
concurrency: release-info | |
env: | |
# renovate: datasource=node-version depName=node versioning=node | |
NODE_VERSION: "22.7.0" | |
jobs: | |
release-info: | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Select NodeJS version | |
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: ${{ inputs.registry-url }} | |
- name: Enable Corepack | |
run: | | |
corepack enable | |
yarn config set enableGlobalCache false | |
- name: Load cached dependencies | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4 | |
with: | |
path: .yarn/cache | |
key: ${{ runner.os }}-node${{ env.NODE_VERSION }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node${{ env.NODE_VERSION }} | |
- name: Install dependencies | |
run: yarn install | |
- 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 }}" |