From 978afdad971df7ccf38b03a83a20657b96f9c0f6 Mon Sep 17 00:00:00 2001 From: Ted Patrick Date: Sun, 25 Sep 2022 12:24:41 -0500 Subject: [PATCH] Snapshot releases (#789) * A workflow that enables snapshot releases by manual github action * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * typo in comment * match naming and add name to workflow Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .github/workflows/publish-snapshot.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/publish-snapshot.yml diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml new file mode 100644 index 00000000..05c903a8 --- /dev/null +++ b/.github/workflows/publish-snapshot.yml @@ -0,0 +1,26 @@ +name: '[CI] Publish Snapshot' +# Copy /unstable/ to /snapshots/2022.09.1.RC1/ + +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: + snapshot: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - 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: Sync to S3 + run: > + aws s3 sync --dryrun s3://pyscript.net/unstable/ s3://pyscript.net/snapshots/${{ inputs.snapshot_version }}/