chore: default nodejs 18 #112
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '*.*' | |
workflow_dispatch: | |
inputs: | |
deploy: | |
type: boolean | |
required: true | |
description: Deploy package | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: build | |
if: ${{ (!github.event.workflow && true) || (github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && true) || false }} | |
outputs: | |
version: ${{ steps.version.outputs.new_tag }} | |
major: ${{ steps.version.outputs.major_tag }} | |
minor: ${{ steps.version.outputs.minor_tag }} | |
is_prerelease: ${{ steps.version.outputs.is_prerelease }} | |
deploy: ${{ steps.version.outputs.deploy }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: get version | |
id: version | |
uses: ./get-version | |
with: | |
WITH_V: true | |
TRUNCATE_PRERELEASE: true | |
tag: | |
if: needs.build.outputs.deploy == 'true' || github.event.inputs.deploy == 'true' | |
needs: build | |
runs-on: ubuntu-latest | |
name: push tag | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: push tag | |
uses: tfso/action-helpers/tag@v1 | |
with: | |
tag: ${{ needs.build.outputs.version }} | |
- if: needs.build.outputs.is_prerelease == 'false' | |
name: push major tag | |
uses: tfso/action-helpers/tag@v1 | |
with: | |
tag: ${{ needs.build.outputs.major }} | |
- if: needs.build.outputs.is_prerelease == 'false' | |
name: push major tag | |
uses: tfso/action-helpers/tag@v1 | |
with: | |
tag: ${{ needs.build.outputs.minor }} | |
- uses: tfso/action-changelog-release@v1 | |
if: needs.build.outputs.is_prerelease == 'false' | |
name: create github release | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
version: ${{ needs.build.outputs.version }} |