This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
Integrate callbacks and other functionalities required for SLR SaitoT… #3
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: publish | |
on: | |
push: | |
branches: [ prod, master ] | |
pull_request: | |
branches: [ develop, master ] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/Checkout@v3 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
registry-url: 'https://registry.npmjs.org' | |
cache: npm | |
# cache-dependency-path: saito-wasm/package-lock.json | |
- name: get latest version | |
run: | | |
echo latest_version=$(npm show saito-js version) >> $GITHUB_ENV | |
echo current_version=$(npm pkg get version) >> $GITHUB_ENV | |
# working-directory: saito-wasm | |
- name: version check fail | |
run: | | |
echo "same version is already published" | |
echo "current version : ${{ env.current_version }}" | |
echo "published version : ${{ env.latest_version }}" | |
- name: Install npm packages | |
if: ${{ env.latest_version != env.current_version }} | |
run: npm ci | |
# working-directory: saito-wasm | |
- name: Publish package | |
if: ${{ env.latest_version != env.current_version }} | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# working-directory: saito-wasm |