Skip to content

feature: add-map-array-to-key-value-map-function #22

feature: add-map-array-to-key-value-map-function

feature: add-map-array-to-key-value-map-function #22

name: Release Package Next
on:
push:
branches:
- 'main'
jobs:
install_dependencies:
name: Install Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install dependencies by lockfile
run: npm clean-install
- name: Generate Public API
run: npm run barrel
- name: Share prepared workspace with other jobs
uses: actions/cache@v3
with:
key: "workspace:${{github.sha}}"
path: ./
static_files:
name: Build Static Files
runs-on: ubuntu-latest
needs: [ install_dependencies ]
steps:
- name: Download prepared workspace
uses: actions/cache@v3
with:
key: "workspace:${{github.sha}}"
path: ./
- name: Build static files
run: npm run build
- name: Share prepared dist with other jobs
uses: actions/cache@v3
with:
key: "dist:${{github.sha}}"
path: ./dist
publish:
name: Run publish
runs-on: ubuntu-latest
needs: [ static_files ]
steps:
- name: Download prepared workspace
uses: actions/cache@v3
with:
key: "workspace:${{github.sha}}"
path: ./
- name: Download prepared dist
uses: actions/cache@v3
with:
key: "dist:${{github.sha}}"
path: ./dist
- name: Use Node.js
uses: actions/setup-node@v3
with:
always-auth: true
node-version: 18
- name: 'Authorize to NPM Registry'
run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_DEPLOY_TOKEN}}" >> dist/.npmrc
- name: Do prepublish
run: |
export VERSION=$(git describe --abbrev=0 --tags)
npm run build:prepublish
env:
GIT_COMMIT_HASH: ${{github.sha}}
- name: Publish
run: cd dist && npm publish --access public --tag next