mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
* calculate tag for the release This is based on the name we use in the version e.g.: `3.2.0-beta.2`. If no name can be found in the version, we will default to `latest` * ignore node_modules caching for now
57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
name: Release
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [12]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3
|
|
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: Install dependencies
|
|
# if: steps.cache.outputs.cache-hit != 'true'
|
|
run: npm install
|
|
env:
|
|
CI: true
|
|
|
|
- name: Test
|
|
run: npm test
|
|
env:
|
|
CI: true
|
|
|
|
- name: Calculate tag
|
|
run: |
|
|
echo "tag_name=$(npm run calculate-tag-name --silent)" >> $GITHUB_ENV
|
|
|
|
- name: Publish
|
|
run: npm publish --tag ${{ env.tag_name }}
|
|
env:
|
|
CI: true
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|