Skip to content

[VEG-662] Improve release and automate process #69

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
32 changes: 32 additions & 0 deletions .github/workflows/publish_artifactory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: publish

on:
push:
branches: master

jobs:
main:
name: tag_and_publish
runs-on: zendesk-stable
steps:
- uses: zendesk/checkout@v2
with:
token: ${{ secrets.ORG_GITHUB_WRITE_TOKEN }}
- uses: zendesk/[email protected]
with:
node-version: '12.x'
- uses: zendesk/ga/tag-semantic-release@v2
id: tag
with:
github-token: ${{ secrets.ORG_GITHUB_WRITE_TOKEN }}
version-type: patch
- name: build_on_merge
run: |
git config user.name github-actions
git config user.email [email protected]
npm install
npm run build
npm version ${{ steps.tag.outputs.version }} --force -m "Upgrade to %s from github actions build_on_merge step [ci skip]"
npm publish
npm run release
Comment on lines +25 to +31
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these steps need to be tweaked, install, version, publish etc all happen in release.sh


8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"lint": "eslint . --ext .ts --config .eslintrc",
"test": "nyc --extension .ts mocha --opts mocha.opts --forbid-only packages/**/src/**/*.test.ts",
"test:functional": "mocha -r ts-node/register packages/**/tests/**/*.test.ts",
"changelog": "lerna-changelog"
"changelog": "lerna-changelog",
"release": "./scripts/release.sh"
},
"license": "Apache-2.0",
"licenses": [
Expand All @@ -60,5 +61,8 @@
}
],
"repository": "zendesk/zcli",
"types": "lib/index.d.ts"
"types": "lib/index.d.ts",
"publishConfig": {
"registry": "https://zdrepo.jfrog.io/zdrepo/api/npm/npm"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think we should hardcode this here, we publish for both public and internal, which means we should dynamically pass this value during the release https://github.com/lerna/lerna/tree/main/commands/publish#--registry-url

}
}