Skip to content

build: fix release #170

build: fix release

build: fix release #170

Workflow file for this run

name: Pre-release
on:
push:
branches:
- develop
jobs:
pre-release:
name: Publish image and pre-release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run Semantic Release dry run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release --dry-run
- name: Set up QEMU
if: env.NEXT_VERSION_TAG
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
if: env.NEXT_VERSION_TAG
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
if: env.NEXT_VERSION_TAG
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
if: env.NEXT_VERSION_TAG
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/raunot/plex-rewind:develop
ghcr.io/raunot/plex-rewind:${{ env.NEXT_VERSION_TAG }}
build-args: |
NEXT_PUBLIC_VERSION_TAG=${{ env.NEXT_VERSION_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Semantic Release publish
if: env.NEXT_VERSION_TAG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release