From cb1d2e083a61650f57114ec6d51790e6d47cc13c Mon Sep 17 00:00:00 2001 From: Josh <37798644+joshuaellis@users.noreply.github.com> Date: Tue, 7 May 2024 16:35:55 +0100 Subject: [PATCH] chore: add automated releases (#8) --- .changeset/config.json | 2 +- .changeset/pre.json | 8 ++++++++ .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ package.json | 2 +- 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .changeset/pre.json create mode 100644 .github/workflows/release.yml diff --git a/.changeset/config.json b/.changeset/config.json index 7b9b8b1..40a5be6 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,7 +1,7 @@ { "$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json", "commit": false, - "changelog": false, + "changelog": ["@changesets/changelog-github", { "repo": "strapi/sdk-plugin" }], "access": "public", "baseBranch": "main" } diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 0000000..d2b7651 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,8 @@ +{ + "mode": "pre", + "tag": "beta", + "initialVersions": { + "@strapi/sdk-plugin": "5.0.0-beta.6" + }, + "changesets": [] +} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e91e5df --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release + +on: + push: + branches: + - main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + name: Release + if: github.repository == 'strapi/sdk-plugin' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + - uses: actions/setup-node@v4 + with: + cache: pnpm + node-version: lts/* + - run: corepack enable && pnpm --version + - run: pnpm install + - run: pnpm build + + - name: Create Release Pull Request or Publish to npm + id: changesets + uses: changesets/action@v1 + with: + version: yarn release:version + publish: yarn release:publish + commit: 'chore: version packages for release' + title: 'chore: version packages for release' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 435a5fd..10558a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@strapi/sdk-plugin", - "version": "5.0.0", + "version": "5.0.0-beta.6", "description": "Simple tools for developing Strapi plugins", "keywords": [ "strapi",