Skip to content

fix: scripts fixes #151

fix: scripts fixes

fix: scripts fixes #151

Workflow file for this run

name: Release
on:
push:
branches:
- "main"
- "next"
env:
HUSKY: 0
CI: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Use Latest Corepack
run: |
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
npm install -g corepack@latest
echo "After : corepack version => $(corepack --version)"
corepack enable
pnpm --version
- name: Setup node.js
uses: actions/setup-node@v4
with:
cache: "pnpm"
node-version-file: ".nvmrc"
- name: Configure access to private npm packages
run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > .npmrc
# prepare script runs before publish, and it needs husky
- name: Install dependencies
run: |
pnpm install --frozen-lockfile
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
flavor: |
latest=${{ github.ref_name == 'main' }}
images: |
ghcr.io/gearbox-protocol/periphery-v3
tags: |
type=ref,event=branch
type=ref,event=tag
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and push docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64 #,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}