Skip to content

feat(workflows): add pull request and release workflows #6

feat(workflows): add pull request and release workflows

feat(workflows): add pull request and release workflows #6

Workflow file for this run

name: Release
on:
push:
branches:
# Using feature branch for testing to avoid polluting main with a bunch of commits
- feature/create-release-action
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
build:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- run: npm ci
- name: Build app
run: npm run build
- name: Lint TS
run: npm run lint
- name: Run tests
run: npm run test:ci
release:
name: Release
needs: [setup, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- run: npm ci
- name: Release
run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}