chore(release): 1.7.1 #53
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: Main Push | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
Install: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v4 | |
id: cache-node_modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
- if: steps.cache-node_modules.outputs.cache-hit != 'true' | |
run: npm ci | |
Test: | |
needs: | |
- Install | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v4 | |
id: cache-node_modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
- run: npm run test | |
Lint: | |
needs: | |
- Install | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v4 | |
id: cache-node_modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
- run: npm run lint | |
Typecheck: | |
needs: | |
- Install | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v4 | |
id: cache-node_modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
- run: npm run typecheck | |
Build: | |
needs: | |
- Install | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v4 | |
id: cache-node_modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
- run: npm run build | |
Release: | |
# Prevent infinite release loop | |
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release)') }} | |
needs: | |
- Lint | |
- Typecheck | |
- Build | |
- Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v4 | |
id: cache-node_modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
- run: npx semantic-release | |
env: | |
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
GIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }} | |
GIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }} | |
GIT_GIT_COMMITTER_NAME_NAME: ${{ github.event.head_commit.committer.name }} | |
GIT_GIT_COMMITTER_NAME_EMAIL: ${{ github.event.head_commit.committer.email }} |