Skip to content

Release

Release #4

Workflow file for this run

name: Release
on:
release:
types: [published]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Use Node LTS ✨
uses: actions/setup-node@v3
with:
node-version: lts/*
registry-url: https://registry.npmjs.org
cache: yarn
- name: Install dependencies 📦️
run: yarn install --frozen-lockfile
- name: Build 🔨
run: yarn build
- name: Get version from git tag 🏷️
id: version
uses: jannemattila/get-version-from-tag@v1
- name: Set version to release tag 📝
run:
yarn version --no-commit-hooks --no-git-tag-version --new-version ${{
steps.version.outputs.version }}
- name: Publish 🚀
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push version changes to main branch
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore: release ${{ github.event.release.tag_name }}'
branch: main
file_pattern: package.json