From fd95a6972373edaf6a3c8fe4adfa9447516050ec Mon Sep 17 00:00:00 2001 From: Zou Guangxian Date: Sat, 15 Jun 2024 23:56:47 +0800 Subject: [PATCH] chore: workflow to publish packages for this repository --- .github/workflows/publish-packages.yml | 29 ++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/publish-packages.yml diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml new file mode 100644 index 000000000..e02709ddb --- /dev/null +++ b/.github/workflows/publish-packages.yml @@ -0,0 +1,29 @@ +name: Publish @layerzerolabs packages + +on: + push: + branches: + - gx/main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + name: Release + if: github.repository == 'LayerZero-Labs/changesets' + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/ci-setup + + - name: Create Release Pull Request or Publish to npm + # https://github.com/changesets/action + uses: changesets/action@v1 + with: + # this expects you to have a script called release which does a build for your packages and calls changeset publish + publish: yarn release + version: yarn version-packages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 775a54a3f..956d84502 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "changeset": "packages/cli/bin.js", "check-all": "yarn test && yarn lint && yarn types:check", "version-packages": "changeset version && yarn prettier", + "release-packages": "yarn workspace @changesets/cli pack && npm --no-workspaces publish packages/cli/changesets-cli-*.tgz", "release": "yarn build && changeset publish" }, "repository": {