flotilla/.gitea/workflows/release.yml

80 lines
1.9 KiB
YAML

name: Release
on:
push:
tags: ["*.*.*"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
REGISTRY: gitea.coracle.social
IMAGE_NAME: coracle/flotilla
jobs:
image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: hodlbod
password: ${{ secrets.PACKAGE_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=raw,value=latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
target: production
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# The signed builds come from pnpm release:local, so nothing here holds a signing key
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Install dependencies
run: |
corepack enable
pnpm i --frozen-lockfile
npm ci --prefix electron
- name: Release
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITEA_PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
run: pnpm release:ci --yes