diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 9be3c9c..743aafe 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -28,21 +28,16 @@ jobs: node-version: ${{ matrix.node-version }} - name: Use cached node_modules - id: cache uses: actions/cache@v3 with: path: node_modules - key: nodeModules-${{ hashFiles('./package.json') }}-${{ matrix.node-version }} - restore-keys: | - nodeModules- + key: nodeModules-${{ hashFiles('./package-lock.json') }}-${{ matrix.node-version }} - name: Install dependencies - if: steps.cache.outputs.cache-hit != 'true' run: npm install - env: - CI: true + + - name: Build + run: npm run build - name: Test run: npm test - env: - CI: true diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 0ec76a4..ddfa3a2 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -15,7 +15,7 @@ permissions: jobs: prepare: permissions: - contents: write # for softprops/action-gh-release to create GitHub release + contents: write # for softprops/action-gh-release to create GitHub release runs-on: ubuntu-latest @@ -31,16 +31,21 @@ jobs: with: node-version: ${{ matrix.node-version }} registry-url: 'https://registry.npmjs.org' - # cache: 'npm' - # - # - name: Use cached node_modules - # id: cache - # uses: actions/cache@v3 - # with: - # path: node_modules - # key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }} - # restore-keys: | - # nodeModules- + + - name: Use cached node_modules + uses: actions/cache@v3 + with: + path: node_modules + key: nodeModules-${{ hashFiles('./package-lock.json') }}-${{ matrix.node-version }} + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Test + run: npm test - name: Resolve version id: vars @@ -54,20 +59,9 @@ jobs: echo "$RELEASE_NOTES" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV - - name: Install dependencies - # if: steps.cache.outputs.cache-hit != 'true' - run: npm install - env: - CI: true - - - name: Test - run: npm test - env: - CI: true - - name: Release uses: softprops/action-gh-release@v1 with: draft: true tag_name: ${{ env.TAG_NAME }} - body: ${{ env.RELEASE_NOTES }} + body: ${{ env.RELEASE_NOTES }} diff --git a/.github/workflows/release-insiders.yml b/.github/workflows/release-insiders.yml index c6ced95..4a91bf2 100644 --- a/.github/workflows/release-insiders.yml +++ b/.github/workflows/release-insiders.yml @@ -22,30 +22,29 @@ jobs: registry-url: 'https://registry.npmjs.org' - name: Use cached node_modules - id: cache uses: actions/cache@v3 with: path: node_modules - key: nodeModules-${{ hashFiles('**/package.json') }}-${{ matrix.node-version }} - restore-keys: | - nodeModules- + key: nodeModules-${{ hashFiles('./package-lock.json') }}-${{ matrix.node-version }} - name: Install dependencies - if: steps.cache.outputs.cache-hit != 'true' run: npm install - env: - CI: true + + - name: Build + run: npm run build + + - name: Test + run: npm test - name: Resolve version id: vars - run: | + run: | echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - - name: "Version based on commit: 0.0.0-insiders.${{ env.SHA_SHORT }}" + - name: 'Version based on commit: 0.0.0-insiders.${{ env.SHA_SHORT }}' run: npm version 0.0.0-insiders.${{ env.SHA_SHORT }} --force --no-git-tag-version - name: Publish run: npm publish --tag insiders env: - CI: true NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 67d7f37..2b133f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,27 +23,21 @@ jobs: with: node-version: ${{ matrix.node-version }} registry-url: 'https://registry.npmjs.org' - # cache: 'npm' - # - # - name: Use cached node_modules - # id: cache - # uses: actions/cache@v3 - # with: - # path: node_modules - # key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }} - # restore-keys: | - # nodeModules- + + - name: Use cached node_modules + uses: actions/cache@v3 + with: + path: node_modules + key: nodeModules-${{ hashFiles('./package-lock.json') }}-${{ matrix.node-version }} - name: Install dependencies - # if: steps.cache.outputs.cache-hit != 'true' run: npm install - env: - CI: true + + - name: Build + run: npm run build - name: Test run: npm test - env: - CI: true - name: Calculate environment variables run: | @@ -52,5 +46,4 @@ jobs: - name: Publish run: npm publish --tag ${{ env.RELEASE_CHANNEL }} env: - CI: true NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 57071b4..f239b0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Nothing yet! +## [0.1.1] - 2023-03-31 + +### Fixed + +- Ensure types are published to npm ([#11](https://github.com/tailwindlabs/tailwindcss-container-queries/pull/11)) + ## [0.1.0] - 2022-10-19 ### Added @@ -16,5 +22,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add new `@container`, `@container-normal` utilities. - Add new `@xs`, `@sm`, ..., `@[400px]`, variants. -[unreleased]: https://github.com/tailwindlabs/tailwindcss-container-queries/compare/v0.1.0...HEAD +[unreleased]: https://github.com/tailwindlabs/tailwindcss-container-queries/compare/v0.1.1...HEAD +[0.1.1]: https://github.com/tailwindlabs/tailwindcss-container-queries/compare/v0.1.0...v0.1.1 [0.1.0]: https://github.com/tailwindlabs/tailwindcss-container-queries/releases/tag/v0.1.0 diff --git a/README.md b/README.md index 85fe116..634ca32 100644 --- a/README.md +++ b/README.md @@ -27,47 +27,68 @@ module.exports = { ## Usage +Start by marking an element as a container using the `@container` class, and then applying styles based on the size of that container using the container variants like `@md:`, `@lg:`, and `@xl:`: + ```html -