Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating how we do versioning #4

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- features/*
- release/*
env:
CI_PUBLISH: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }}
CI_PUBLISH:
jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -67,9 +67,9 @@ jobs:
run: yarn install --immutable

- name: Publish
if: ${{ env.CI_PUBLISH }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
shell: bash
env:
PUBLISH_ARGS: --access public --new-version 0.0.1-alpha+${{ env.COMMIT }} --tag alpha
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn run publish:all
PUBLISH_ARGS: --access public --tag alpha
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn run publish:all 0.0.1-alpha.${{ env.COMMIT }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"format-check:all": "yarn run prettier --check .",
"format:all": "yarn run prettier --write .",
"lint:all": "yarn run eslint .",
"publish:all": "yarn workspaces foreach -A run npm publish $PUBLISH_ARGS",
"publish:all": "yarn workspace @radius-project/manifest-to-bicep-extension run version ${0} && yarn workspace @radius-project/manifest-to-bicep-extension run publish $PUBLISH_ARGS",
"test:all": "jest",
"test:ci": "jest --ci --reporters default --reporters github-actions"
},
Expand Down
10 changes: 6 additions & 4 deletions packages/manifest-to-bicep-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@radius-project/manifest-to-bicep-extension",
"version": "0.0.1",
"version": "0.0.1-alpha",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/radius-project/bicep-tools.git"
"url": "git+https://github.com/radius-project/bicep-tools.git"
},
"publishConfig": {
"access": "public",
"provenance": true,
"registry": "@radius-project:https://npm.pkg.github.com"
"@radius-project:registry": "https://npm.pkg.github.com"
},
"packageManager": "[email protected]",
"files": [
Expand All @@ -19,6 +19,8 @@
"scripts": {
"build": "tsc",
"watch": "tsc -w",
"prepublishOnly": "yarn build"
"publish": "npm publish",
"prepublishOnly": "yarn build",
"version": "npm pkg set version=${0}"
}
}
Loading