Skip to content

Commit d7a11df

Browse files
authored
Merge pull request #2121 from dxc-technology/jialecl/package-version
workflows updated to match any version in package instead of 0.0.0
2 parents 5121403 + 41081f9 commit d7a11df

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

.github/workflows/publish-next.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@ jobs:
3333

3434
- name: Install dependencies
3535
run: npm install
36-
36+
3737
- name: Build library and website
3838
env:
3939
NEXT_PUBLIC_SITE_VERSION: next
4040
run: npm run build
41-
41+
4242
- name: Test library
4343
run: npm run test
44-
44+
4545
- name: Test library accessibility
4646
run: npm run test:accessibility
4747

4848
- name: Publish NEXT version to npm
4949
run: |
50-
sed -i "s#\"version\": \"0.0.0\"#\"version\": \"0.0.0-${GITHUB_SHA:0:7}\"#" ./packages/lib/package.json
50+
sed -i "s#\"version\": \".*\"#\"version\": \"$(jq -r .version ./packages/lib/package.json)-${GITHUB_SHA:0:7}\"#" ./packages/lib/package.json
5151
cd packages/lib
5252
npm publish --tag next --access public
5353
env:

.github/workflows/publish-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ jobs:
3030

3131
- name: Install dependencies
3232
run: npm install
33-
33+
3434
- name: Build library and website
3535
run: npm run build
36-
36+
3737
- name: Test library
3838
run: npm run test
39-
39+
4040
- name: Test library accessibility
4141
run: npm run test:accessibility
4242

4343
- name: Publish RELEASE to npm
4444
run: |
45-
sed -i "s#\"version\": \"0.0.0\"#\"version\": \"${TAG_NAME}\"#" ./packages/lib/package.json
45+
sed -i "s#\"version\": \".*\"#\"version\": \"${TAG_NAME}\"#" ./packages/lib/package.json
4646
cd packages/lib
4747
npm publish --access public
4848
env:

packages/lib/tsup.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ export default defineConfig({
66
entry: ["src/index.ts"],
77
format: ["cjs", "esm"],
88
injectStyle: true,
9-
minify: true,
109
splitting: false,
1110
});

0 commit comments

Comments
 (0)