Skip to content

Commit

Permalink
test: changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoKam committed Mar 31, 2024
1 parent a4c3b72 commit 277a3e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/changesets-auto-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,9 @@ jobs:
- name: Get current timestamp
run: echo "timestamp=$(date +'%Y-%m-%d_%H_%M_%S')" >> $GITHUB_ENV
- name: Get changeset status
uses: actions/github-script@v5
id: changesetStatus
with:
script: |
const { execSync } = require('child_process');
const fs = require('fs');
execSync(`npx changeset status --output changeset-status.json`);
const status = JSON.parse(fs.readFileSync('changeset-status.json'));
const message = [...new Set(status.changesets.map(({summary}) => summary))].join('; ');
core.setOutput('status', message);
run: |
node ./changeset-status.cjs
- name: changesets-version
id: changesets
uses: changesets/action@v1
Expand Down
8 changes: 8 additions & 0 deletions changeset-status.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const { execSync } = require('child_process');
const fs = require('fs');
const core = require('@actions/core');

execSync(`npx changeset status --output changeset-status.json`);
const status = JSON.parse(fs.readFileSync('changeset-status.json'));
const message = [...new Set(status.changesets.map(({ summary }) => summary))].join('; ');
core.setOutput('status', message);

0 comments on commit 277a3e2

Please sign in to comment.