Skip to content

Commit

Permalink
chore: add automated releases (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaellis authored May 7, 2024
1 parent c1cf014 commit cb1d2e0
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -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"
}
8 changes: 8 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@strapi/sdk-plugin": "5.0.0-beta.6"
},
"changesets": []
}
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit cb1d2e0

Please sign in to comment.