Skip to content

Converted to ESModule and Upgraded to serverless v3 #142

Converted to ESModule and Upgraded to serverless v3

Converted to ESModule and Upgraded to serverless v3 #142

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
name: Test and Build
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: install, lint, test, build
run: |
DEBUG=true yarn install --frozen-lockfile
yarn run lint
yarn test
yarn build
publish:
name: Publish
runs-on: ubuntu-latest
needs: [test]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: install
run: yarn install --frozen-lockfile
- name: package-version
run: node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
- name: package-version-to-git-tag
uses: pkgdeps/git-tag-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repo: ${{ github.repository }}
version: ${{ env.PACKAGE_VERSION }}
git_commit_sha: ${{ github.sha }}
git_tag_prefix: "v"
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}