Skip to content

Update node version to 'lts/*' #16

Update node version to 'lts/*'

Update node version to 'lts/*' #16

Workflow file for this run

name: lambda-queue
on:
push:
branches: [ main ]
paths:
# Build when there are changes in the directory that holds the component,
# or when this workflow file is changed
- 'lambda-queue/**'
- '.github/workflows/lambda-queue.yml'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- name: git setup
run: |
git config --global user.name "${{ github.workflow }}"
git config --global user.email "gha@scloud/${{ github.workflow }}"
- name: Build
working-directory: ./${{ github.workflow }}
run: |
yarn
yarn lint
yarn test
yarn compile
yarn package
- name: Publish
working-directory: ./${{ github.workflow }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn publish --patch --access public
- name: Push
working-directory: ./${{ github.workflow }}
if: always()
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
# Push updated pakage.json to Github
# We need this to happen always to avoid the repo getting stuck on an already-published version
git commit -am "Patch version" || true
git pull --rebase
git push