Skip to content

Release

Release #7

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
packages: write
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: docker/setup-buildx-action@v3 # for cross-arch build - GH runners are AMD but VPS is ARM
- name: Set release version
# `#v` to strip the `v` prefix: v1.2.3 -> 1.2.3
run: echo "RELEASE_VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Log in to GHCR
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image and publish to GHCR
uses: docker/[email protected]
with:
context: .
push: true
platforms: linux/arm64
tags: |
ghcr.io/ivov/n8n-shortlink:latest
ghcr.io/ivov/n8n-shortlink:${{ env.RELEASE_VERSION }}