Skip to content

ci: upload-artifact v3 -> v4 #38

ci: upload-artifact v3 -> v4

ci: upload-artifact v3 -> v4 #38

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
branches: ["dev"]
pull_request:
branches: ["main"]
types: [opened, closed]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
- name: Test
id: vitest
run: npm run test:unit -- --coverage
- name: Upload coverage report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: vitest-report
path: ./vitest
Release:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main' && github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
with:
branches: |
[
"main"
]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}