Skip to content

Build

Build #102

Workflow file for this run

name: Build
on: push
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
with:
# Fetches entire history, so we can analyze commits since last tag
fetch-depth: 0
- name: Install
run: npm ci
- name: Check
run: npm run prettier-check
- name: Build
run: npm run build
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0
with:
useConfigFile: true
configFilePath: .github/version_config.yml
- name: Create tag
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/v${{ steps.gitversion.outputs.semVer }}",
sha: context.sha
})
- name: Generate Release Notes
id: release_notes
uses: ./.github/actions/release-notes-generator
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ steps.gitversion.outputs.semVer }}
from_tag_exclusive: ${{ steps.gitversion.outputs.versionSourceSha }}
to_tag_inclusive: v${{ steps.gitversion.outputs.semVer }}
- name: Print Release Notes
run: echo '${{ steps.release_notes.outputs.release_notes }}'