v2.10.96 #223
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Vivid React | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- v* | |
permissions: read-all | |
jobs: | |
build-publish: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Setup NodeJS | |
uses: actions/setup-node@main | |
with: | |
node-version: 18 | |
- name: Fetch package version | |
run: node -p -e '`RELEASE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV | |
- name: Install dependencies & build | |
run: | | |
npm install -g yarn | |
yarn | |
yarn build | |
- name: Publish to Github | |
run: | | |
cd dist | |
echo registry=https://npm.pkg.github.com/ > .npmrc | |
echo //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN} >> .npmrc | |
yarn publish --new-version ${RELEASE_VERSION} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Publish to Npmjs.com | |
run: | | |
cd dist | |
rm .npmrc || true | |
echo registry=https://registry.npmjs.org/ > .npmrc | |
echo //registry.npmjs.org/:_authToken=${TOKEN} >> .npmrc | |
yarn publish --new-version ${RELEASE_VERSION} | |
env: | |
TOKEN: ${{ secrets.NPM_TOKEN }} # token has been issued on January 4, 2023. It's valid for 1 year |