Skip to content

Commit

Permalink
ci(.github): Add Release workflow
Browse files Browse the repository at this point in the history
This commit introduces a new GitHub Action workflow. This workflow is
responsible for code checkout, setup of Node.js with pnpm, dependencies
installation, also caching and release automation. Now, every push to
the main branch will trigger this release workflow.

Signed-off-by: Giovanni Ravalico <[email protected]>
  • Loading branch information
suddenlyGiovanni committed Apr 4, 2024
1 parent ae9e9d2 commit cdf9720
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 📦 Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
run_install: false

- name: 🗂️ Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: 🛠️ Set up Node.js
uses: actions/setup-node@v4
with:
node-version: current
cache: "pnpm"

- name: 🗄️ Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: 🧩 Install dependencies
run: pnpm install --frozen-lockfile --prod=false

- name: 🦋 Create a Changeset Release Pull Request
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit cdf9720

Please sign in to comment.