From 83132fcb62250633585080a3000beba23d403993 Mon Sep 17 00:00:00 2001 From: Adam Matthiesen Date: Wed, 14 Feb 2024 03:13:37 -0800 Subject: [PATCH 1/2] Update changeset and contributing information and add new workflow --- .changeset/config.json | 2 +- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ CONTRIBUTING.md | 9 +++++++-- package.json | 2 ++ 4 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.changeset/config.json b/.changeset/config.json index fce1c265..bfd27ffa 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,5 +7,5 @@ "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": [] + "ignore": ["playground","tsconfig"] } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..90644dd6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release +on: + push: + branches: + - main +concurrency: ${{ github.workflow }}-${{ github.ref }} +permissions: {} #reset +jobs: + release: + # IMPORTANT: prevent this action from running on forks + if: github.repository == 'MatthiesenXYZ/astro-ghostcms' + permissions: + contents: write # to create release (changesets/action) + pull-requests: write # to create pull request (changesets/action) + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm ci + - name: Publish to npm + id: changesets + uses: changesets/action@v1 + with: + publish: npm run release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 21538bdb..c5d235c6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,8 +7,13 @@ We love your input! We want to make contributing to this project as easy and tra - Proposing new features - Becoming a maintainer -## We Develop with Github -We use github to host code, to track issues and feature requests, as well as accept pull requests. +## We Develop with Github & Sync our Code to GitLab +We use github to host code, to track issues and feature requests, as well as accept pull requests. Then All of our Code is Mirrored to GitLab. + +## We Use Changesets to aid with Development! +This repo uses [changesets](https://github.com/changesets/changesets) to make releasing updates easier. For you, the contributor, this means you should run `pnpm changeset` when you've got your changes ready. + +For more details, see this short document on [adding a changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md#i-am-in-a-single-package-repository). ## We Use Github, So All Code Changes Happen Through Pull Requests and Commits Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests: diff --git a/package.json b/package.json index 2cbdea7b..e8144223 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,8 @@ }, "scripts": { "lint": "biome check .", + "changeset": "changeset", + "release": "changeset publish", "lint:fix": "biome check --apply .", "playground:dev": "pnpm --filter playground dev", "api:test": "pnpm --filter astro-ghostcms test", From f07a8ee940c6498dba8773395cfd1e3bacd278b0 Mon Sep 17 00:00:00 2001 From: Adam Matthiesen <30383579+Adammatthiesen@users.noreply.github.com> Date: Wed, 14 Feb 2024 03:15:33 -0800 Subject: [PATCH 2/2] Update config.json --- .changeset/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/config.json b/.changeset/config.json index bfd27ffa..092f6fb9 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,5 +7,5 @@ "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": ["playground","tsconfig"] + "ignore": ["playground"] }