Skip to content

Commit

Permalink
ci: improve actions
Browse files Browse the repository at this point in the history
  • Loading branch information
damianricobelli committed Aug 16, 2024
1 parent 4db9ed7 commit 0893858
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 72 deletions.
7 changes: 5 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"changelog": [
"@changesets/changelog-github",
{ "repo": "damianricobelli/stepperize" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/changelog-release.yml

This file was deleted.

36 changes: 14 additions & 22 deletions .github/workflows/npm-publish.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ on:
push:
branches:
- main
tags:
- 'v*.*.*'
paths:
- 'packages/react/**'

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions: {}
jobs:
publish:
release:
permissions:
contents: write
issues: write
pull-requests: write
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -44,21 +44,13 @@ jobs:
run: pnpm build
working-directory: packages/react

- name: Set up npm token
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Bump version with Changesets
run: pnpm version-packages

- name: Commit the version bump
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "ci: bump version [skip ci]"
git push origin main
- name: Publish to npm
- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
publish: pnpm release
version: pnpm version
commit: "chore: new release"
title: "chore: new release candidate"
env:
GH_ACTION_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm release
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"clean": "turbo run clean && rm -rf node_modules .pnpm-store .turbo",
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write",
"version-packages": "pnpm changeset version",
"release": "pnpm changeset publish"
"version": "changeset version",
"release": "changeset publish"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
Expand Down

0 comments on commit 0893858

Please sign in to comment.