Skip to content

Commit

Permalink
feat: add provisioning tokens support (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
pviti authored Nov 21, 2023
1 parent aa9c421 commit cea9331
Show file tree
Hide file tree
Showing 9 changed files with 1,522 additions and 51 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build package
run: pnpm build
- name: Run specs
env:
CL_SDK_ORGANIZATION: cli-test-org
CL_SDK_CLIENT_ID: SQWYt6tF8bx9uWzxGbrPxEMCEP5dCZbu93r56KRTLPY
CL_SDK_CLIENT_SECRET: DKMUFKTxqjfEc9SMNeG2FKPLqKOdMHYwz1BysAJcObw
run: pnpm test
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpx semantic-release
1 change: 1 addition & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"require": "ts-node/register",
"loader": "ts-node/esm"
}
22 changes: 22 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"ci": true,
"dryRun": false,
"branches": [
{ "name": "main", "channel": "latest" },
"+([0-9])?(.{+([0-9]),x}).x",
{ "name": "beta", "prerelease": true }
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
"@semantic-release/npm",
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md"
}],
["@semantic-release/git", {
"assets": [ "package.json", "CHANGELOG.md" ],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}]
]
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
"@commercelayer/cli-dev": "^2.0.5",
"@commercelayer/eslint-config-ts": "^1.2.0",
"@oclif/plugin-help": "^5.2.20",
"@oclif/test": "^2.5.6",
"@oclif/test": "^3.1.2",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/chai": "^4.3.11",
"@types/inquirer": "^8.2.10",
"@types/mocha": "^10.0.5",
Expand All @@ -65,6 +67,7 @@
"eslint": "^8.54.0",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"semantic-release": "^22.0.8",
"ts-node": "^10.9.1",
"typescript": "^5.3.2"
},
Expand Down
Loading

0 comments on commit cea9331

Please sign in to comment.