Skip to content

ci(action): update actions/cache action to v5.0.2 (#654) #491

ci(action): update actions/cache action to v5.0.2 (#654)

ci(action): update actions/cache action to v5.0.2 (#654) #491

Workflow file for this run

name: 📢 Publish Next
on:
push:
branches:
- main
jobs:
publish:
name: 📢 Publish Next
permissions:
packages: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version-file: package.json
registry-url: https://registry.npmjs.org/
- name: Get Short SHA
run: echo "SHORT_SHA=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_ENV
- name: Get Next Version
run: |
current_date=$(date +'%Y%m%d')
echo "NEW_VERSION=0.0.0-next-${SHORT_SHA}-${current_date}" >> $GITHUB_ENV
- name: Use Next Version
run: |
git config --global user.email "info@descope.com"
git config --global user.name "Descope"
yarn version --new-version ${NEW_VERSION}
cat package.json
- name: Install dependencies
run: npm ci --ignore-scripts
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_READ_ORG }}
# `npm rebuild` will run all those post-install scripts for us.
- run: npm rebuild && npm run prepare --if-present
- name: Publish to NPM Package Registry
run: npm publish --access=public --tag next
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_REGISTRY }}