Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 9 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
strategy:
matrix:
node-version:
- 22.x
- 24.x
- 22
- 24
steps:
Comment on lines 17 to 20
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -27,7 +27,7 @@ jobs:
- run: npm test
- run: npm run build
- name: Save build
if: matrix.node-version == '22.x'
if: matrix.node-version == 22
uses: actions/upload-artifact@v7
Comment on lines 29 to 31
with:
name: build
Expand All @@ -51,33 +51,14 @@ jobs:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

npm-publish-build:
npm-publish-dev:
needs: build
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC
contents: read
steps:
- uses: actions/download-artifact@v8
with:
name: build
- uses: actions/setup-node@v6
with:
node-version: 22.x
registry-url: 'https://registry.npmjs.org'
- name: Update npm to latest (required for OIDC)
run: npm install -g npm@latest
- uses: rlespinasse/github-slug-action@v3.x
- name: Append commit hash to package version
run: 'sed -i -E "s/(\"version\": *\"[^\"]+)/\1-${GITHUB_SHA_SHORT}/" package.json'
- name: Disable pre- and post-publish actions
run: 'sed -i -E "s/\"((pre|post)publish)/\"ignore:\1/" package.json'
- name: Publish to npm
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
run: npm publish --tag ${{ env.GITHUB_REF_SLUG }}
uses: SolidOS/solidos/.github/workflows/publish-prerelease.yml@main
with:
node_version: 22

npm-publish-latest:
needs: [build, npm-publish-build]
needs: [build]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
Expand All @@ -89,7 +70,7 @@ jobs:
name: build
- uses: actions/setup-node@v6
with:
node-version: 22.x
node-version: 22
registry-url: 'https://registry.npmjs.org'
- name: Update npm to latest (required for OIDC)
run: npm install -g npm@latest
Expand Down
Loading