Skip to content

build: fixed eslint and types issues #22

build: fixed eslint and types issues

build: fixed eslint and types issues #22

Workflow file for this run

name: Release
env:
USE_LOCKFILE: ${{ secrets.USE_LOCKFILE }}
ENABLE_RELEASE: ${{ secrets.ENABLE_RELEASE }}
ENABLE_BUILD: ${{ secrets.ENABLE_BUILD }}
on:
push:
branches: [ master, alpha, beta, build ]
repository_dispatch:
types: [ release ]
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["lts/*"]
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/composite-setup
with:
USE_LOCKFILE: ${{ secrets.USE_LOCKFILE }}
- name: Build
if: "env.ENABLE_BUILD == 'true'"
uses: ./.github/actions/composite-build
with:
USE_LOCKFILE: ${{ secrets.USE_LOCKFILE }}
- name: Release
if: "env.ENABLE_RELEASE == 'true' && ! contains('refs/heads/build ', github.ref)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm semantic-release
- name: Release Dry Run
if: "env.ENABLE_RELEASE != 'true' || contains('refs/heads/build ', github.ref)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm semantic-release --dry-run
- run: echo "env.ENABLE_RELEASE is ${{ env.ENABLE_RELEASE == 'true' }} and branch is ${{ github.ref }}, no release can be published." && exit 1
if: "env.ENABLE_RELEASE != 'true' || contains('refs/heads/build ', github.ref)"