update: publish /src
to npm branch
#9
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: Build scripts | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: yarn install and build | |
run: | | |
yarn | |
yarn run build:umd | |
mkdir npm && mv dist LICENSE README.md package.json src npm && mv npm/dist/esm/index.browser.d.ts npm/dist/esm/translator.mod.d.ts | |
- name: Deploy | |
uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: [email protected]:BANKA2017/translator-utils.git | |
BRANCH: npm | |
FOLDER: npm | |
COMMIT_NAME: ${{ secrets.COMMIT_NAME }} | |
COMMIT_EMAIL: ${{ secrets.COMMIT_EMAIL }} | |
SQUASH_HISTORY: true | |
MESSAGE: 'npm: {msg} ~ {sha}' | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} |