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

semantic-release #101

Open
wants to merge 7 commits into
base: dev
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
25 changes: 20 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
name: Publish Package to npmjs
on:
release:
types: [published]
push:
branches: ['main', 'dev']
jobs:
npm-publish:
runs-on: ubuntu-latest
permissions:
issues: write
contents: write
packages: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm i -g bun
- run: bun install --frozen-lockfile
- run: npm publish
- run: npm run release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Merge main -> dev
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f
if: github.ref == 'refs/heads/main'
with:
type: now
from_branch: main
target_branch: dev
github_token: ${{ secrets.GITHUB_TOKEN }}
Binary file modified bun.lockb
Binary file not shown.
69 changes: 68 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"bin": {
"tealscript": "dist/bin/tealscript.js"
},
"files": [
"dist/**/*"
],
"scripts": {
"test": "jest tests/",
"test-coverage": "jest --coverage tests/",
Expand Down Expand Up @@ -47,7 +50,8 @@
"compile-examples": "conc \"bun compile-amm\" \"bun compile-arc75\" \"bun compile-auction\" \"bun compile-itxns\" \"bun compile-simple\" \"bun compile-tuple_in_box\" \"bun compile-calculator\" \"bun compile-merkle\" \"bun compile-big_box\" \"bun compile-arc72\" \"bun compile-non_abi\"",
"webpack-smoketest": "webpack --config tests/web/webpack.config.js",
"pre-commit": "conc \"bun lint\" \"bun test\" \"bun test examples/\" \"bun run-examples\" \"bun webpack-smoketest\"",
"compile-all": "conc \"bun compile-tests\" \"bun compile-examples\""
"compile-all": "conc \"bun compile-tests\" \"bun compile-examples\"",
"release": "semantic-release"
},
"dependencies": {
"@microsoft/tsdoc": "^0.14.2",
Expand All @@ -60,8 +64,15 @@
"devDependencies": {
"@algorandfoundation/algokit-client-generator": "^2.2.1",
"@algorandfoundation/algokit-utils": "^2.1.0",
"@google/semantic-release-replace-plugin": "^1.2.7",
"@jest/globals": "^29.5.0",
"@knodes/typedoc-plugin-pages": "^0.23.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^10.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^9.0.4",
"@semantic-release/npm": "^10.0.4",
"@semantic-release/release-notes-generator": "^11.0.4",
"@types/node": "^18.11.9",
"@types/node-fetch": "^2.6.2",
"@typescript-eslint/eslint-plugin": "^5.44.0",
Expand All @@ -73,12 +84,68 @@
"eslint-plugin-import": "^2.26.0",
"jest": "^29.5.0",
"path-browserify": "^1.0.1",
"semantic-release": "^21.0.7",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.4",
"ts-node": "^10.9.1",
"typedoc": "^0.23.23",
"typedoc-plugin-merge-modules": "^4.0.1",
"webpack": "^5.88.1",
"webpack-cli": "^5.1.4"
},
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
[
"@google/semantic-release-replace-plugin",
{
"replacements": [
{
"files": [
"src/version.ts"
],
"from": "VERSION = '.*'",
"to": "VERSION = '${nextRelease.version}'",
"results": [
{
"file": "src/version.ts",
"hasChanged": true,
"numMatches": 1,
"numReplacements": 1
}
],
"countMatches": true
}
]
}
],
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md",
"package.json",
"src/version.ts"
],
"message": "chore(release): TEALScript \n\n${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
"successComment": false
}
]
],
"branches": [
"main",
{
"name": "dev",
"prerelease": "beta"
}
]
}
}