Skip to content

Commit 21fc405

Browse files
Use npm-package-versioner-action for version stamping (#1275)
Replaces @microbit-foundation/circleci-npm-package-versioner, which the workflow installed via --no-save purely to run one script, with the equivalent GitHub Action. The action is public so version stamping no longer needs to be gated on the repository owner. Prerelease versions for non-tag builds change format slightly, e.g. main is now 3.0.0-dev.<build>. Tag builds are unchanged, so the production deployment prefix is unaffected.
1 parent 6d7103c commit 21fc405

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ env:
2020
DEPLOY_AWS_VERSION: "0.6.0"
2121
# renovate: datasource=npm depName=@microbit-foundation/website-deploy-aws-config registryUrl=https://npm.pkg.github.com
2222
DEPLOY_AWS_CONFIG_VERSION: "0.9.0"
23-
# renovate: datasource=npm depName=@microbit-foundation/circleci-npm-package-versioner registryUrl=https://npm.pkg.github.com
24-
VERSIONER_VERSION: "1"
2523

2624
jobs:
2725
build:
@@ -49,17 +47,16 @@ jobs:
4947
cache: "npm"
5048
registry-url: "https://npm.pkg.github.com"
5149
- run: npm install -g npm@${{ env.NPM_VERSION }} --registry=https://registry.npmjs.org
50+
- uses: microbit-foundation/npm-package-versioner-action@v3
5251
- run: npm ci
5352
env:
5453
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55-
- run: npm install --no-save @microbit-foundation/python-editor-v3-microbit@${{ env.THEME_VERSION }} @microbit-foundation/website-deploy-aws@${{ env.DEPLOY_AWS_VERSION }} @microbit-foundation/website-deploy-aws-config@${{ env.DEPLOY_AWS_CONFIG_VERSION }} @microbit-foundation/circleci-npm-package-versioner@${{ env.VERSIONER_VERSION }}
54+
- run: npm install --no-save @microbit-foundation/python-editor-v3-microbit@${{ env.THEME_VERSION }} @microbit-foundation/website-deploy-aws@${{ env.DEPLOY_AWS_VERSION }} @microbit-foundation/website-deploy-aws-config@${{ env.DEPLOY_AWS_CONFIG_VERSION }}
5655
if: github.repository_owner == 'microbit-foundation'
5756
env:
5857
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5958
- run: node ./bin/print-ci-env-stage.cjs >> $GITHUB_ENV
6059
- run: node ./bin/print-ci-env-public-url.cjs >> $GITHUB_ENV
61-
- run: npm run ci:update-version
62-
if: github.repository_owner == 'microbit-foundation'
6360
- run: npm run ci
6461
env:
6562
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
"scripts": {
9696
"build": "vite build",
9797
"prebuild": "npm run panda",
98-
"ci:update-version": "update-ci-version",
9998
"ci": "npm run typecheck && npm run test && npm run lint && npm run build",
10099
"deploy": "website-deploy-aws",
101100
"dev:link-ui": "rm -rf node_modules/@microbit/ui node_modules/@microbit/ui-patterns && ln -s ../../../ui/packages/ui node_modules/@microbit/ui && ln -s ../../../ui/packages/ui-patterns node_modules/@microbit/ui-patterns && rm -rf styled-system node_modules/.vite && npm run panda",

0 commit comments

Comments
 (0)