Skip to content

.github/workflows/latestPublish.yml #625

.github/workflows/latestPublish.yml

.github/workflows/latestPublish.yml #625

Workflow file for this run

on:
workflow_dispatch:
push:
tags:
- '*'
# Scheduled jobs will only run on the default branch
schedule:
- cron: '0 */5 * * *' # Run every 5 hours
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Sleep when triggered by new tag to wait for npm publish
- name: Sleep For 3 Mins
if: ${{ github.event_name == 'push' }}
run: sleep 180s
shell: bash
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: Install Deps
run: npm install
- name: Globally install the CLI
run: |
npm install -g @hubspot/cli@latest
- name: Install the test dependencies
run: yarn install --cwd='acceptance-tests'
- name: Test Latest CLI Release
run: |
npm run test-cli
env:
PORTAL_ID: ${{ secrets.ACCEPTANCE_TEST_PORTAL_ID }}
PERSONAL_ACCESS_KEY: ${{ secrets.ACCEPTANCE_TEST_PERSONAL_ACCESS_KEY }}
USE_INSTALLED: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release Failure Slack Report
uses: ravsamhq/notify-slack-action@v2
if: ${{ always() && github.ref_name == 'main' }}
with:
status: ${{ job.status }}
notify_when: 'failure'
mention_groups: 'S07FLKPAPAS'
notification_title: 'CLI latest release failure'
message_format: '{emoji} *NPM Release* {status_message}'
footer: '<{run_url}|View Run> | <https://www.npmjs.com/package/@hubspot/cli?activeTab=versions|View in NPM>'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}