Calculate tag for releases based on package.json version (#9572)
* 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
This commit is contained in:
parent
855fa300a0
commit
c2854dae71
6 changed files with 41 additions and 28 deletions
22
.github/workflows/integration-tests.yml
vendored
22
.github/workflows/integration-tests.yml
vendored
|
|
@ -33,19 +33,19 @@ jobs:
|
|||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
|
||||
- name: Use cached node_modules (tailwindcss)
|
||||
id: cache-tailwindcss
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: node_modules
|
||||
key: nodeModules-${{ hashFiles('./package-lock.json') }}-${{ matrix.node-version }}-tailwindcss
|
||||
restore-keys: |
|
||||
nodeModules-
|
||||
# cache: 'npm'
|
||||
#
|
||||
# - name: Use cached node_modules (tailwindcss)
|
||||
# id: cache-tailwindcss
|
||||
# uses: actions/cache@v3
|
||||
# with:
|
||||
# path: node_modules
|
||||
# key: nodeModules-${{ hashFiles('./package-lock.json') }}-${{ matrix.node-version }}-tailwindcss
|
||||
# restore-keys: |
|
||||
# nodeModules-
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache-tailwindcss.outputs.cache-hit != 'true'
|
||||
# if: steps.cache-tailwindcss.outputs.cache-hit != 'true'
|
||||
run: npm install
|
||||
env:
|
||||
CI: true
|
||||
|
|
|
|||
4
.github/workflows/nodejs.yml
vendored
4
.github/workflows/nodejs.yml
vendored
|
|
@ -26,8 +26,8 @@ jobs:
|
|||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
# cache: 'npm'
|
||||
|
||||
# cache: 'npm'
|
||||
#
|
||||
# - name: Use cached node_modules
|
||||
# id: cache
|
||||
# uses: actions/cache@v3
|
||||
|
|
|
|||
4
.github/workflows/release-insiders.yml
vendored
4
.github/workflows/release-insiders.yml
vendored
|
|
@ -23,8 +23,8 @@ jobs:
|
|||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
# cache: 'npm'
|
||||
|
||||
# cache: 'npm'
|
||||
#
|
||||
# - name: Use cached node_modules
|
||||
# id: cache
|
||||
# uses: actions/cache@v3
|
||||
|
|
|
|||
28
.github/workflows/release.yml
vendored
28
.github/workflows/release.yml
vendored
|
|
@ -23,19 +23,19 @@ 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-
|
||||
# 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'
|
||||
# if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: npm install
|
||||
env:
|
||||
CI: true
|
||||
|
|
@ -45,8 +45,12 @@ jobs:
|
|||
env:
|
||||
CI: true
|
||||
|
||||
- name: Calculate tag
|
||||
run: |
|
||||
echo "tag_name=$(npm run calculate-tag-name --silent)" >> $GITHUB_ENV
|
||||
|
||||
- name: Publish
|
||||
run: npm publish
|
||||
run: npm publish --tag ${{ env.tag_name }}
|
||||
env:
|
||||
CI: true
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue