Skip to content

Commit

Permalink
chore: update workflow to support semantic release (#602)
Browse files Browse the repository at this point in the history
* chore: update workflow to support semantic release

* fix: support for ethers-v5 branch

* chore: update npm publish to use just one workflow

* chore: delete tag from npm publish workflow and update git release workflow

* fix: update starting commit sha

* fix: disable bump-patch-for-minor-pre-major

---------

Co-authored-by: Marko Arambasic <[email protected]>
  • Loading branch information
kiriyaga-txfusion and kiriyaga authored Dec 22, 2023
1 parent 808fc6c commit 5384f53
Show file tree
Hide file tree
Showing 18 changed files with 108 additions and 776 deletions.
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

41 changes: 41 additions & 0 deletions .github/release-please/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"separate-pull-requests": true,
"group-pull-request-title-pattern": "chore(${component}): release at branch ${branch}",
"bootstrap-sha": "4d2086931dcebd7e7c21cad9cbd6668c2abbebbf",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"packages": {
"packages/hardhat-zksync-deploy": {
"release-type": "node",
"component": "@matterlabs/hardhat-zksync-deploy"
},
"packages/hardhat-zksync-solc": {
"release-type": "node",
"component": "@matterlabs/hardhat-zksync-solc"
},
"packages/hardhat-zksync-upgradable": {
"release-type": "node",
"component": "@matterlabs/hardhat-zksync-upgradable"
},
"packages/hardhat-zksync-vyper": {
"release-type": "node",
"component": "@matterlabs/hardhat-zksync-vyper"
},
"packages/hardhat-zksync-verify": {
"release-type": "node",
"component": "@matterlabs/hardhat-zksync-verify"
},
"packages/hardhat-zksync-toolbox": {
"release-type": "node",
"component": "@matterlabs/hardhat-zksync-toolbox"
},
"packages/hardhat-zksync-node": {
"release-type": "node",
"component": "@matterlabs/hardhat-zksync-node"
},
"packages/hardhat-zksync-chai-matchers": {
"release-type": "node",
"component": "@matterlabs/hardhat-zksync-chai-matchers"
}
}
}
10 changes: 10 additions & 0 deletions .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"packages/hardhat-zksync-deploy": "1.1.1",
"packages/hardhat-zksync-solc": "1.0.5",
"packages/hardhat-zksync-upgradable": "1.2.0",
"packages/hardhat-zksync-vyper": "1.0.4",
"packages/hardhat-zksync-verify": "1.2.1",
"packages/hardhat-zksync-toolbox": "1.2.0",
"packages/hardhat-zksync-node": "1.0.0",
"packages/hardhat-zksync-chai-matchers": "1.2.0"
}
29 changes: 0 additions & 29 deletions .github/workflows/create-release-pull-request.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish packages to github

on:
push:
branches:
- main
- ethers-v5
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_please_output: ${{ toJSON(steps.release.outputs) }}
steps:
- name: Run release-please
id: release
uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: .github/release-please/config.json
manifest-file: .github/release-please/manifest.json
target-branch: ${{ github.ref_name }}
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
name: Publish zkvyper plugin
name: Publish packages to npm

on:
push:
tags:
- '@matterlabs/hardhat-zksync-vyper@*'
workflow_dispatch:
inputs:
tag:
required: true
type: choice
description: tag to publish
default: latest
options:
- latest
- beta
- alpha

package:
required: true
type: choice
description: package to publish
default: hardhat-zksync-deploy
options:
- hardhat-zksync-deploy
- hardhat-zksync-solc
- hardhat-zksync-upgradable
- hardhat-zksync-vyper
- hardhat-zksync-verify
- hardhat-zksync-toolbox
- hardhat-zksync-node
- hardhat-zksync-chai-matchers
- hardhat-zksync-ethers
- hardhat-zksync-verify-vyper

jobs:
publish:
Expand All @@ -24,23 +49,7 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_NPM_MATTERLABS_AUTOMATION_TOKEN }}
run: |
if [[ ${{ github.ref }} == *"beta"* ]]; then
echo "Publishing package with beta tag"
npm publish @matterlabs/hardhat-zksync-vyper --tag beta --workspace=packages/hardhat-zksync-vyper --access=public
else
echo "Publishing package with latest tag"
npm publish @matterlabs/hardhat-zksync-vyper --tag latest --workspace=packages/hardhat-zksync-vyper --access=public
fi
- name: Create github release from tags
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [[ ${{ github.ref }} != *"beta"* ]]; then
node scripts/create-release-from-tags/run.js --package hardhat-zksync-vyper
else
echo "Skipping github release creation for beta tag"
fi
npm publish @matterlabs/${{inputs.package}} --tag ${{ inputs.tag }} --workspace=packages/${{inputs.package}} --access=public
- name: Create the MM Message
env:
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/publish-chai-matchers.yml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/publish-deploy.yml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/publish-node.yaml

This file was deleted.

Loading

0 comments on commit 5384f53

Please sign in to comment.