Skip to content

Commit

Permalink
chore: add semantic release (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 authored Aug 31, 2023
1 parent 30eeccd commit f5ef23a
Show file tree
Hide file tree
Showing 7 changed files with 4,955 additions and 105 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Publish to NPM
name: Release
on:
push:
tags:
- "*"
branches:
- main
- '[0-9]+.*'

jobs:
build:
release:
name: Release
runs-on: [self-hosted, ci-runner]
environment: production release
steps:
Expand All @@ -17,13 +19,12 @@ jobs:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies and build
run: npm ci && npm run build && npm run replaceVars
env:
RUDDER_STACK_KEY: ${{ secrets.RUDDER_STACK_KEY }}
RUDDER_STACK_DATAPLANE_URL: ${{ secrets.RUDDER_STACK_DATAPLANE_URL }}
- name: Publish package on NPM
run: npm publish --access public
run: npm ci && npm run build && npm run replaceVars
- name: Release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_NPM_MATTERLABS_AUTOMATION_TOKEN }}
RUDDER_STACK_KEY: ${{ secrets.RUDDER_STACK_KEY }}
RUDDER_STACK_DATAPLANE_URL: ${{ secrets.RUDDER_STACK_DATAPLANE_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPMJS_NPM_MATTERLABS_AUTOMATION_TOKEN }}
run: npx semantic-release
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ignore everything
*

# Include specific files
!bin/
!package.json
!package-lock.json
!LICENSE-MIT
34 changes: 34 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/npm",
{
"npmPublish": true,
"tarballDir": "dist"
}
],
[
"@semantic-release/github",
{
"assets": "dist/*.tgz"
}
]
]
}
21 changes: 21 additions & 0 deletions LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Matter Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,7 @@ zkSync-cli tracks its usage for the single purpose of providing data so it can b
- [GitHub](https://github.com/matter-labs)
- [Twitter](https://twitter.com/zksync)
- [Discord](https://join.zksync.dev/)

## 📜 License

This project is licensed under [MIT](./LICENSE-MIT).
Loading

0 comments on commit f5ef23a

Please sign in to comment.