Skip to content

Commit 49fc74b

Browse files
chore: update CI workflows to set package version dynamically since the update to yarn 4 and adjust TypeScript compilation directory (#161)
1 parent 86a5075 commit 49fc74b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/release.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@ jobs:
6060
- run: yarn install --frozen-lockfile
6161
- run: yarn lint
6262
- run: yarn test
63-
# Must run tsc first to generate the .d.ts files.
6463
- run: yarn tsc
65-
working-directory: .
64+
working-directory: ${{ github.workspace }}
6665
- run: yarn build
6766
# Version it with the version in the tag and upload it to a draft release.
68-
- run: yarn version --new-version ${{ needs.split-tag.outputs.version }}
67+
- name: Set version
68+
run: |
69+
node -e "const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json')); pkg.version='${{ needs.split-tag.outputs.version }}'; fs.writeFileSync('package.json', JSON.stringify(pkg,null,2)+'\n');"
70+
echo "Set version to ${{ needs.split-tag.outputs.version }}"
6971
- run: yarn pack
7072
- uses: softprops/action-gh-release@v2
7173
with:

.github/workflows/test.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ jobs:
7777
- run: yarn test
7878
id: test
7979
if: success() || failure()
80+
# Run tsc from repository root to generate shared .d.ts files for all plugins
8081
- run: yarn tsc
81-
working-directory: .
82+
working-directory: ${{ github.workspace }}
8283
if: success() || failure()
8384
# Build the plugin
8485
- run: yarn build

0 commit comments

Comments
 (0)