Skip to content

chore(deps): update codecov/codecov-action action to v5 (#415) #464

chore(deps): update codecov/codecov-action action to v5 (#415)

chore(deps): update codecov/codecov-action action to v5 (#415) #464

name: Continuous Delivery
on:
workflow_dispatch:
push:
branches:
- main
jobs:
Publish:
name: Publish Next to npm
runs-on: ubuntu-latest
if: github.repository_owner == 'skyra-project'
steps:
- name: Checkout Project
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Add TypeScript problem matcher
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
- name: Bump Version & Publish
run: |
# Resolve the tag to be used. "next" for push events, "pr-{prNumber}" for dispatch events.
TAG=$([[ ${{ github.event_name }} == 'push' ]] && echo 'next' || echo 'pr-${{ github.event.inputs.prNumber }}')
yarn config set npmAuthToken ${NODE_AUTH_TOKEN}
yarn config set npmPublishRegistry "https://registry.yarnpkg.com"
yarn bump --preid "${TAG}.$(git rev-parse --verify --short HEAD)" --skip-changelog
yarn npm publish --tag ${TAG}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}