Skip to content

chore(deps): bump @devfile/api from 2.2.2-1709808589 to 2.2.2-1715367… #548

chore(deps): bump @devfile/api from 2.2.2-1709808589 to 2.2.2-1715367…

chore(deps): bump @devfile/api from 2.2.2-1709808589 to 2.2.2-1715367… #548

#
# Copyright (c) 2021 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
name: typescript-publish-next
on:
push:
branches:
- main
paths:
- 'package.json'
- 'tools/build/**'
- '.github/workflows/typescript-publish.yml'
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
scope: '@eclipse-che'
- name: Clone source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: yarn-
- name: typescript dependencies
run: |
yarn
- name: publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
cd tools/build
yarn compile
SHORT_SHA1=$(git rev-parse --short=7 HEAD)
CURRENT_VERSION=$(sed -r 's/(.*)-SNAPSHOT/\1/' ../../VERSION)
NEW_VERSION="${CURRENT_VERSION}-dev-${SHORT_SHA1}"
sed -i -r -e "s/(\"version\": )(\".*\")/\1\"$NEW_VERSION\"/" package.json
npm publish --tag next