2023-08-21 15:28:54 +00:00
|
|
|
name: Publish pre-release
|
|
|
|
concurrency: publish
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 18
|
2023-08-21 15:43:26 +00:00
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Cache node_modules
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: node_modules
|
|
|
|
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-node_modules-${{ hashFiles('**/package-lock.json') }}
|
2023-08-21 15:28:54 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: npm install && npm run bootstrap
|
2023-08-21 15:53:42 +00:00
|
|
|
- name: Bump IntelliSense version
|
2023-08-21 15:28:54 +00:00
|
|
|
run: >
|
|
|
|
node .github/workflows/bump-version.mjs &&
|
|
|
|
cat packages/vscode-tailwindcss/package.json
|
2023-08-21 15:53:42 +00:00
|
|
|
- name: Publish IntelliSense
|
|
|
|
env:
|
|
|
|
VSCODE_TOKEN: ${{ secrets.VSCODE_TOKEN }}
|
2023-08-21 15:59:37 +00:00
|
|
|
run: >
|
|
|
|
cd packages/vscode-tailwindcss &&
|
|
|
|
npm run publish -- --pre-release -p $VSCODE_TOKEN
|
2023-08-21 15:28:54 +00:00
|
|
|
- name: Build LSP
|
2023-08-21 15:31:28 +00:00
|
|
|
run: npx lerna run build --scope=@tailwindcss/language-server
|
2023-08-21 15:28:54 +00:00
|
|
|
- name: Resolve LSP version
|
|
|
|
run: |
|
|
|
|
echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
|
|
- name: 'Version LSP based on commit: 0.0.0-insiders.${{ env.SHA_SHORT }}'
|
|
|
|
run: >
|
|
|
|
cd packages/tailwindcss-language-server &&
|
|
|
|
npm version 0.0.0-insiders.${{ env.SHA_SHORT }} --force --no-git-tag-version
|
|
|
|
- name: Publish LSP
|
|
|
|
run: >
|
|
|
|
cd packages/tailwindcss-language-server &&
|
2023-08-21 15:43:26 +00:00
|
|
|
npm publish --tag insiders --access public
|
2023-08-21 15:28:54 +00:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|