Skip to content

feat!: release for adonis 6 #2

feat!: release for adonis 6

feat!: release for adonis 6 #2

name: Release
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Release please
uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: node
- name: Checkout
uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
if: ${{ steps.release.outputs.release_created }}
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
if: ${{ steps.release.outputs.release_created }}
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
if: ${{ steps.release.outputs.release_created }}
- name: Install dependencies
run: pnpm i
if: ${{ steps.release.outputs.release_created }}
- name: Publish
run: pnpm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}