Skip to content

Commit

Permalink
Merge pull request #80 from mattf96s/chore/release-workflow
Browse files Browse the repository at this point in the history
chore(release): adjust release workflow
  • Loading branch information
mattf96s committed May 14, 2024
2 parents f92cd55 + e744d8d commit 3e07546
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ find the full documentation for it [in our repository](https://github.com/change

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

## Troubleshooting (not automatically generated)

The github release workflow seems to cause caching issues. See <https://github.com/changesets/changesets/issues/421> for more information. Based on this [comment](https://github.com/changesets/changesets/issues/421#issuecomment-1946660604) we have adjusted the release workflow.
9 changes: 7 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"changelog": [
"@changesets/changelog-github",
{
"repo": "mattf96s/QuackDB"
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
}
30 changes: 27 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,41 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v3

- name: Setup Node.js 20
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: "pnpm"

- name: Install Dependencies
run: yarn
run: pnpm install --frozen-lockfile

- name: Create Release Pull Request
uses: changesets/action@v1
id: changesets
with:
commit: "chore: publish new release"
title: "chore: publish new release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get current branch
id: get_branch
run: echo "CURRENT_BRANCH=$(git branch --show-current)" >> $GITHUB_ENV

- name: Update lock file
if: env.CURRENT_BRANCH == 'changeset-release/main'
run: pnpm install --lockfile-only

- name: Commit lock file
if: env.CURRENT_BRANCH == 'changeset-release/main'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update lock file"
branch: changeset-release/main

0 comments on commit 3e07546

Please sign in to comment.