From 3338aa911a4aa4a25150ab8fb45964dd39e591ba Mon Sep 17 00:00:00 2001 From: William So Date: Thu, 11 Jan 2024 11:40:13 +0800 Subject: [PATCH 1/2] Add using changesets in the contributing section of readme Signed-off-by: William So --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 575557c..fbec556 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,16 @@ This file is automatically opened on first install. You can reopen it in setting Contributions are welcome! +This project uses [`changesets`](https://github.com/changesets/changesets) to manage the changelog. When creating a pull request, please [add a changeset](https://github.com/changesets/changesets/blob/main/docs/intro-to-using-changesets.md#adding-changesets) describing the changes. Add multiple changesets if your pull request changes several things. End each changeset with `([PR number](PR link) by [author username](author link))`. For example, the newly created file under the directory `.changeset` should look like: + +```Markdown +--- +"example": patch +--- + +This is an example change. ([GH#1](https://github.com/ghost/example/pull/1) by [@ghost](https://github.com/ghost)) +``` + ### Todos The todos here, ordered alphabetically, are things planned for the plugin. There are no guarantees that they will be completed. However, we are likely to accept contributions for them. From bfde8ed0747433ecf818078a697b85d7d12d4546 Mon Sep 17 00:00:00 2001 From: William So Date: Thu, 11 Jan 2024 11:56:06 +0800 Subject: [PATCH 2/2] Add CI workflow and rename workflow files Signed-off-by: William So --- .github/workflows/latest.yml | 19 ++----------------- .github/workflows/push.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index f2e8e46..d8bfdd5 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -1,5 +1,5 @@ jobs: - build: + release-latest: permissions: contents: write runs-on: ubuntu-latest @@ -20,22 +20,7 @@ jobs: env: GH_TOKEN: ${{github.token}} run: | - gh release upload latest .github/*.tgz main.js manifest.json styles.css --clobber - build-pnpm: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - uses: pnpm/action-setup@v2 - with: - version: '*' - - uses: actions/setup-node@v3 - with: - cache: pnpm - node-version: '*' - - run: pnpm install - - run: pnpm build + gh release upload latest .github/*.tgz --clobber on: push: tags: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..c76d09f --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,33 @@ +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - uses: actions/setup-node@v3 + with: + cache: npm + node-version: '*' + - run: npm ci + - run: npm run build + build-pnpm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - uses: pnpm/action-setup@v2 + with: + version: '*' + - uses: actions/setup-node@v3 + with: + cache: pnpm + node-version: '*' + - run: pnpm install + - run: pnpm build +on: + pull_request_target: + push: + workflow_dispatch: +permissions: {}