Next Build Snapshot (#1703)

This commit is contained in:
Ted Patrick
2023-09-14 11:04:13 -05:00
committed by GitHub
parent b9c3eb6442
commit ffd9e6f4d0

View File

@@ -0,0 +1,58 @@
name: "Next Build Snapshot"
on:
workflow_dispatch:
inputs:
snapshot_version:
description: "The calver version of this snapshot: 2022.09.1 or 2022.09.1.RC1"
type: string
required: true
jobs:
next-build-snapshot:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: next
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
working-directory: ./pyscript.core
run: npm install
- name: Build Pyscript.core
working-directory: ./pyscript.core
run: npm run build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1.6.1
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_OIDC_RUNNER_ROLE }}
- name: Copy to Snapshot
working-directory: ./pyscript.core/dist
run: >
aws s3 sync . s3://pyscript.net/snapshots/${{ inputs.snapshot_version }}/