diff --git a/.changeset/config.json b/.changeset/config.json index fce1c265..092f6fb9 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,5 +7,5 @@ "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": [] + "ignore": ["playground"] } 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",