Skip to content

Merge pull request #120 from nsc-de/dependabot/npm_and_yarn/babel/cor… #174

Merge pull request #120 from nsc-de/dependabot/npm_and_yarn/babel/cor…

Merge pull request #120 from nsc-de/dependabot/npm_and_yarn/babel/cor… #174

name: "Release 🚀"
on:
push:
branches:
- master
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
packages: write
jobs:
release:
name: Release 🚀
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Cache ♻️
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies 📦
run: npm ci
- name: Cache Turbo ♻️
uses: dtinth/setup-github-actions-caching-for-turbo@v1
with:
cache-prefix: turbo-release-${{github.ref}}_
- name: Build 🔨
run: npm run build
- name: Test 🧪
run: npm run test
- name: Lint 🧹
run: npm run lint
- name: Create Changeset version 📝
id: changeset-version
run: npx changeset version
- name: Publish to NPM 📦
id: changesets
uses: changesets/action@v1
with:
publish: npx changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Commit changes 📝
uses: EndBug/add-and-commit@v9
if: steps.changesets.outputs.published == 'true'
with:
add: "*"
commit: --signoff
default_author: github_actions
message: "Release package(s) 🚀"
pathspec_error_handling: ignore
tag_push: "--force"
# - name: Send a Slack notification if a publish happens
# if: steps.changesets.outputs.published == 'true'
# # You can do something when a publish happens.
# run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!"