Skip to content

Ensure types are published to npm #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
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
13 changes: 4 additions & 9 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
40 changes: 17 additions & 23 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.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
Expand All @@ -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 }}
19 changes: 9 additions & 10 deletions .github/workflows/release-insiders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
25 changes: 9 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -52,5 +46,4 @@ jobs:
- name: Publish
run: npm publish --tag ${{ env.RELEASE_CHANNEL }}
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet!
### Fixed

- Ensure types are published to npm ([#11](https://github.com/tailwindlabs/tailwindcss-container-queries/pull/11))

## [0.1.0] - 2022-10-19

Expand Down