Fix build names for tags #60
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- master | |
tags: | |
- v* | |
pull_request: { } | |
env: | |
CI: true | |
jobs: | |
lint: | |
name: "Lint" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14.x | |
- name: Install Dependencies | |
run: yarn install --frozen-lockfile --non-interactive | |
- name: Lint | |
run: yarn lint | |
node-test: | |
name: "Node Test" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x, 14.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: yarn install --frozen-lockfile --non-interactive | |
- name: Node Tests | |
env: | |
BROWSERSTACK_USERNAME: emberclibrowsersDv86d | |
# This is in plaintext on purpose. It has no privileged access to anything | |
# and allows us to run BrowserStack on pull-requests | |
BROWSERSTACK_ACCESS_KEY: aeqUXusvriNdmYFQpbrj | |
run: yarn test:node | |
smoke-test: | |
name: "Smoke Test" | |
needs: node-test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x, 14.x] | |
env: | |
BROWSERSTACK_USERNAME: emberclibrowsersDv86d | |
# This is in plaintext on purpose. It has no privileged access to anything | |
# and allows us to run BrowserStack on pull-requests | |
BROWSERSTACK_ACCESS_KEY: aeqUXusvriNdmYFQpbrj | |
# The following is necessary when using browserstack under matrix builds on Github Actions | |
# The Job ID + Run ID isn't unique across matrix runs and will fail when run simultaneously | |
BROWSERSTACK_LOCAL_ID_SUFFIX: ${{ matrix.node-version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: yarn install --frozen-lockfile --non-interactive | |
- run: DEBUG=ember-cli-browserstack* yarn browserstack:connect | |
- run: DEBUG=ember-cli-browserstack* yarn test:ember:browserstack | |
- run: DEBUG=ember-cli-browserstack* yarn browserstack:results | |
- run: DEBUG=ember-cli-browserstack* yarn browserstack:disconnect | |
publish: | |
name: Publish to npm | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14.x | |
registry-url: 'https://registry.npmjs.org' | |
- name: install dependencies | |
run: yarn install --frozen-lockfile | |
- name: auto-dist-tag | |
run: npx auto-dist-tag@1 --write | |
- name: publish to npm | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |