File tree Expand file tree Collapse file tree 4 files changed +76
-143
lines changed Expand file tree Collapse file tree 4 files changed +76
-143
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : build
2+
3+ on :
4+ release :
5+ types : [created]
6+ push :
7+ branches :
8+ - " **"
9+
10+ # This is conservative: ideally we'd include branch and stage in this key
11+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
12+ concurrency : deploy-python-simulator
13+
14+ jobs :
15+ build :
16+ runs-on : ubuntu-latest
17+ permissions :
18+ contents : read
19+ packages : read
20+ env :
21+ AWS_DEFAULT_REGION : eu-west-1
22+ PRODUCTION_CLOUDFRONT_DISTRIBUTION_ID : E15FPP46STH15O
23+ STAGING_CLOUDFRONT_DISTRIBUTION_ID : E15FPP46STH15O
24+ REVIEW_CLOUDFRONT_DISTRIBUTION_ID : E2DW5F7PA9W7JD
25+
26+ steps :
27+ # Note: This workflow will not run on forks without modification; we're open to making steps
28+ # that rely on our deployment infrastructure conditional. Please open an issue.
29+ - uses : actions/checkout@v3
30+ - name : Configure node
31+ uses : actions/setup-node@v3
32+ with :
33+ node-version : 16.x
34+ cache : " npm"
35+ registry-url : " https://npm.pkg.github.com"
36+ - run : npm ci
37+ env :
38+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39+ -
run :
npm install --no-save @microbit-foundation/[email protected] @microbit-foundation/[email protected] @microbit-foundation/circleci-npm-package-versioner@1 40+ env :
41+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42+ - run : node ./bin/print-ci-env.js >> $GITHUB_ENV
43+ - run : npm run ci:update-version
44+ - run : ./ci-build.sh
45+ - run : npm run deploy
46+ env :
47+ AWS_ACCESS_KEY_ID : ${{ secrets.WEB_DEPLOY_AWS_ACCESS_KEY_ID }}
48+ AWS_SECRET_ACCESS_KEY : ${{ secrets.WEB_DEPLOY_AWS_SECRET_ACCESS_KEY }}
49+ - run : npm run invalidate
50+ env :
51+ AWS_ACCESS_KEY_ID : ${{ secrets.WEB_DEPLOY_AWS_ACCESS_KEY_ID }}
52+ AWS_SECRET_ACCESS_KEY : ${{ secrets.WEB_DEPLOY_AWS_SECRET_ACCESS_KEY }}
Original file line number Diff line number Diff line change 1+ name : " pr-url"
2+ on :
3+ pull_request :
4+ types : [opened]
5+ jobs :
6+ pr-url :
7+ runs-on : ubuntu-latest
8+ steps :
9+ -
uses :
microbit-foundation/[email protected] 10+ with :
11+ uri-template : " https://review-python-editor-v3.microbit.org/{branch}/"
12+ repo-token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+ const ref = process . env . GITHUB_REF ;
3+ let stage ;
4+ if ( ref === "refs/heads/main" ) {
5+ stage = "STAGING" ;
6+ } else if ( ref . startsWith ( "refs/tags/v" ) ) {
7+ stage = "PRODUCTION" ;
8+ } else {
9+ stage = "REVIEW" ;
10+ }
11+
12+ console . log ( `STAGE=${ stage } ` ) ;
You can’t perform that action at this time.
0 commit comments