--- /dev/null
+name: Build CSS
+
+on:
+ pull_request:
+ paths:
+ - 'scss/**'
+ - 'build/**'
+ - 'package.json'
+ - 'package-lock.json'
+ workflow_dispatch:
+
+env:
+ FORCE_COLOR: 2
+ NODE: 22
+
+permissions:
+ contents: read
+
+jobs:
+ build-css:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ with:
+ persist-credentials: false
+
+ - name: Set up Node.js
+ uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ with:
+ node-version: "${{ env.NODE }}"
+ cache: npm
+
+ - name: Install npm dependencies
+ run: npm ci
+
+ - name: Build CSS
+ run: npm run css
+
+ - name: Upload CSS artifacts
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+ with:
+ name: css-dist
+ path: dist/css/
+ retention-days: 1
--- /dev/null
+name: Build JS
+
+on:
+ pull_request:
+ paths:
+ - 'js/**'
+ - 'build/**'
+ - 'package.json'
+ - 'package-lock.json'
+ workflow_dispatch:
+
+env:
+ FORCE_COLOR: 2
+ NODE: 22
+
+permissions:
+ contents: read
+
+jobs:
+ build-js:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ with:
+ persist-credentials: false
+
+ - name: Set up Node.js
+ uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ with:
+ node-version: "${{ env.NODE }}"
+ cache: npm
+
+ - name: Install npm dependencies
+ run: npm ci
+
+ - name: Build JS
+ run: npm run js
+
+ - name: Upload JS artifacts
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+ with:
+ name: js-dist
+ path: dist/js/
+ retention-days: 1
contents: read
jobs:
+ build-dist:
+ runs-on: ubuntu-latest
+ outputs:
+ css-artifact: ${{ steps.css-artifact.outputs }}
+ js-artifact: ${{ steps.js-artifact.outputs }}
+
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ with:
+ persist-credentials: false
+
+ - name: Set up Node.js
+ uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ with:
+ node-version: "${{ env.NODE }}"
+ cache: npm
+
+ - name: Install npm dependencies
+ run: npm ci
+
+ - name: Build CSS
+ run: npm run css
+
+ - name: Build JS
+ run: npm run js
+
+ - name: Upload CSS artifacts
+ id: css-artifact
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+ with:
+ name: css-dist
+ path: dist/css/
+ retention-days: 1
+
+ - name: Upload JS artifacts
+ id: js-artifact
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+ with:
+ name: js-dist
+ path: dist/js/
+ retention-days: 1
+
bundlewatch:
+ needs: build-dist
runs-on: ubuntu-latest
steps:
- name: Install npm dependencies
run: npm ci
- - name: Run dist
- run: npm run dist
+ - name: Download CSS artifacts
+ uses: actions/download-artifact@v4
+ with:
+ name: css-dist
+ path: dist/css/
+
+ - name: Download JS artifacts
+ uses: actions/download-artifact@v4
+ with:
+ name: js-dist
+ path: dist/js/
- name: Run bundlewatch
run: npm run bundlewatch
--- /dev/null
+name: CDN Distribution
+
+on:
+ release:
+ types: [published]
+ workflow_dispatch:
+
+env:
+ FORCE_COLOR: 2
+ NODE: 22
+
+permissions:
+ contents: read
+
+jobs:
+ build-cdn:
+ runs-on: ubuntu-latest
+ if: ${{ github.repository == 'twbs/bootstrap' && startsWith(github.event.release.tag_name, 'v') }}
+
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ with:
+ persist-credentials: false
+
+ - name: Set up Node.js
+ uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ with:
+ node-version: "${{ env.NODE }}"
+ cache: npm
+
+ - name: Install npm dependencies
+ run: npm ci
+
+ - name: Build CSS
+ run: npm run css
+
+ - name: Build JS
+ run: npm run js
+
+ - name: Generate SRI hashes
+ run: npm run release-sri
+
+ - name: Upload to CDN
+ # This would typically upload to a CDN service like jsDelivr, unpkg, etc.
+ # The actual implementation would depend on the CDN service used
+ run: |
+ echo "CDN upload would happen here"
+ echo "Files ready for CDN distribution:"
+ ls -la dist/css/
+ ls -la dist/js/
contents: read
jobs:
- css:
+ build-css:
runs-on: ubuntu-latest
+ outputs:
+ css-artifact: ${{ steps.css-artifact.outputs }}
steps:
- name: Clone repository
- name: Build CSS
run: npm run css
+ - name: Upload CSS artifacts
+ id: css-artifact
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+ with:
+ name: css-dist
+ path: dist/css/
+ retention-days: 1
+
+ css:
+ needs: build-css
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ with:
+ persist-credentials: false
+
+ - name: Set up Node.js
+ uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ with:
+ node-version: "${{ env.NODE }}"
+ cache: npm
+
+ - name: Install npm dependencies
+ run: npm ci
+
+ - name: Download CSS artifacts
+ uses: actions/download-artifact@v4
+ with:
+ name: css-dist
+ path: dist/css/
+
- name: Run CSS tests
run: npm run css-test
contents: read
jobs:
+ build-dist:
+ runs-on: ubuntu-latest
+ outputs:
+ css-artifact: ${{ steps.css-artifact.outputs }}
+ js-artifact: ${{ steps.js-artifact.outputs }}
+
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ with:
+ persist-credentials: false
+
+ - name: Set up Node.js
+ uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ with:
+ node-version: "${{ env.NODE }}"
+ cache: npm
+
+ - name: Install npm dependencies
+ run: npm ci
+
+ - name: Build CSS
+ run: npm run css
+
+ - name: Build JS
+ run: npm run js
+
+ - name: Upload CSS artifacts
+ id: css-artifact
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+ with:
+ name: css-dist
+ path: dist/css/
+ retention-days: 1
+
+ - name: Upload JS artifacts
+ id: js-artifact
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+ with:
+ name: js-dist
+ path: dist/js/
+ retention-days: 1
+
docs:
+ needs: build-dist
runs-on: ubuntu-latest
steps:
- name: Install npm dependencies
run: npm ci
+ - name: Download CSS artifacts
+ uses: actions/download-artifact@v4
+ with:
+ name: css-dist
+ path: dist/css/
+
+ - name: Download JS artifacts
+ uses: actions/download-artifact@v4
+ with:
+ name: js-dist
+ path: dist/js/
+
- name: Build docs
run: npm run docs-build
contents: read
jobs:
+ build-js:
+ runs-on: ubuntu-latest
+ outputs:
+ js-artifact: ${{ steps.js-artifact.outputs }}
+
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ with:
+ persist-credentials: false
+
+ - name: Set up Node.js
+ uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ with:
+ node-version: ${{ env.NODE }}
+ cache: npm
+
+ - name: Install npm dependencies
+ run: npm ci
+
+ - name: Build JS
+ run: npm run js
+
+ - name: Upload JS artifacts
+ id: js-artifact
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+ with:
+ name: js-dist
+ path: dist/js/
+ retention-days: 1
+
run:
+ needs: build-js
permissions:
# allow coverallsapp/github-action to create new checks issues and fetch code
checks: write
- name: Install npm dependencies
run: npm ci
- - name: Run dist
- run: npm run js
+ - name: Download JS artifacts
+ uses: actions/download-artifact@v4
+ with:
+ name: js-dist
+ path: dist/js/
- name: Run JS tests
run: npm run js-test
if: ${{ github.repository == 'twbs/bootstrap' && startsWith(github.event.release.tag_name, 'v') }}
env:
GITHUB_REF_NAME: ${{ github.ref_name }}
+ FORCE_COLOR: 2
+ NODE: 22
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
+ - name: Set up Node.js
+ uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ with:
+ node-version: "${{ env.NODE }}"
+ cache: npm
+
+ - name: Install npm dependencies
+ run: npm ci
+
+ - name: Build CSS
+ run: npm run css
+
+ - name: Build JS
+ run: npm run js
+
- name: Set up NuGet
uses: nuget/setup-nuget@323ab0502cd38fdc493335025a96c8fdb0edc71f # v2.0.1
with:
--- /dev/null
+name: Release
+
+on:
+ release:
+ types: [published]
+ workflow_dispatch:
+
+env:
+ FORCE_COLOR: 2
+ NODE: 22
+
+permissions:
+ contents: write
+
+jobs:
+ build-and-release:
+ runs-on: ubuntu-latest
+ if: ${{ github.repository == 'twbs/bootstrap' && (github.event_name == 'release' || github.event_name == 'workflow_dispatch') }}
+
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ with:
+ persist-credentials: false
+
+ - name: Set up Node.js
+ uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ with:
+ node-version: "${{ env.NODE }}"
+ cache: npm
+
+ - name: Install npm dependencies
+ run: npm ci
+
+ - name: Build CSS
+ run: npm run css
+
+ - name: Build JS
+ run: npm run js
+
+ - name: Generate SRI hashes
+ run: npm run release-sri
+
+ - name: Build docs
+ run: npm run docs-build
+
+ - name: Create release zip
+ run: npm run release-zip
+
+ - name: Create examples zip
+ run: npm run release-zip-examples
+
+ - name: Upload dist files to release
+ uses: actions/upload-release-asset@v1
+ if: ${{ github.event_name == 'release' }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ github.event.release.upload_url }}
+ asset_path: ./bootstrap-${{ github.event.release.tag_name }}-dist.zip
+ asset_name: bootstrap-${{ github.event.release.tag_name }}-dist.zip
+ asset_content_type: application/zip
+
+ - name: Upload examples to release
+ uses: actions/upload-release-asset@v1
+ if: ${{ github.event_name == 'release' }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ github.event.release.upload_url }}
+ asset_path: ./bootstrap-${{ github.event.release.tag_name }}-examples.zip
+ asset_name: bootstrap-${{ github.event.release.tag_name }}-examples.zip
+ asset_content_type: application/zip
+
+ - name: Commit dist files for npm
+ if: ${{ github.event_name == 'release' }}
+ run: |
+ git config --local user.email "action@github.com"
+ git config --local user.name "GitHub Action"
+ git add dist/
+ git commit -m "Add dist files for release ${{ github.event.release.tag_name }}" || exit 0
+ git push
+
+ - name: Publish to npm
+ if: ${{ github.event_name == 'release' }}
+ run: npm publish
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
*.komodoproject
# Folders to ignore
+/dist/
/dist-sass/
/js/coverage/
/node_modules/