Skip to content

Merge pull request #3 from telicent-oss/release-please--branches--mai… #2

Merge pull request #3 from telicent-oss/release-please--branches--mai…

Merge pull request #3 from telicent-oss/release-please--branches--mai… #2

Workflow file for this run

name: Publish package
on:
push:
branches:
- main
paths:
- CHANGELOG.md
workflow_dispatch:
jobs:
get_version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get version from package.json
id: semver
uses: martinbeentjes/npm-get-version-action@main
outputs:
version: ${{ steps.semver.outputs.current-version }}
build_and_publish:
permissions:
id-token: write
contents: read
packages: write
needs: get_version
env:
APP_NAME: ds
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: configure-node
uses: actions/setup-node@v3
with:
node-version: 20
scope: 'telicent-oss'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
- name: Get node version
id: node
run: |
echo "version=$(node -v)" >> $GITHUB_OUTPUT
- name: Get node_modules cache
uses: actions/cache@v3.0.2
id: node_modules
with:
path: |
**/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}-${{ steps.node.outputs.version }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Install dependencies
run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn publish