Skip to content

Commit 11bdc92

Browse files
authored
npm-publish-dev
npm-publish-dev
2 parents 87a9524 + fe54ab7 commit 11bdc92

1 file changed

Lines changed: 9 additions & 28 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
strategy:
2121
matrix:
2222
node-version:
23-
- 22.x
24-
- 24.x
23+
- 22
24+
- 24
2525

2626
steps:
2727
- uses: actions/checkout@v6
@@ -34,7 +34,7 @@ jobs:
3434
- run: npm test
3535
- run: npm run build --if-present
3636
- name: Save build
37-
if: matrix.node-version == '22.x'
37+
if: matrix.node-version == 22
3838
uses: actions/upload-artifact@v7
3939
with:
4040
name: build
@@ -58,33 +58,14 @@ jobs:
5858
PR_URL: ${{github.event.pull_request.html_url}}
5959
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
6060

61-
npm-publish-build:
61+
npm-publish-dev:
6262
needs: build
63-
runs-on: ubuntu-latest
64-
permissions:
65-
id-token: write # Required for OIDC
66-
contents: read
67-
steps:
68-
- uses: actions/download-artifact@v8
69-
with:
70-
name: build
71-
- uses: actions/setup-node@v6
72-
with:
73-
node-version: 22.x
74-
registry-url: 'https://registry.npmjs.org'
75-
- name: Update npm to latest (required for OIDC)
76-
run: npm install -g npm@latest
77-
- uses: rlespinasse/github-slug-action@v4.x
78-
- name: Append commit hash to package version
79-
run: 'sed -i -E "s/(\"version\": *\"[^\"]+)/\1-${GITHUB_SHA_SHORT}/" package.json'
80-
- name: Disable pre- and post-publish actions
81-
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
82-
- name: Publish to npm
83-
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
84-
run: npm publish --tag ${{ env.GITHUB_REF_SLUG }}
63+
uses: SolidOS/solidos/.github/workflows/publish-prerelease.yml@main
64+
with:
65+
node_version: 22
8566

8667
npm-publish-latest:
87-
needs: [build, npm-publish-build]
68+
needs: [build]
8869
runs-on: ubuntu-latest
8970
if: github.ref == 'refs/heads/main'
9071
permissions:
@@ -96,7 +77,7 @@ jobs:
9677
name: build
9778
- uses: actions/setup-node@v6
9879
with:
99-
node-version: 22.x
80+
node-version: 22
10081
registry-url: 'https://registry.npmjs.org'
10182
- name: Update npm to latest (required for OIDC)
10283
run: npm install -g npm@latest

0 commit comments

Comments
 (0)