Update Release Info #1194
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: | |
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 }}" |