feat: add release

This commit is contained in:
origranot
2024-08-30 16:03:27 +03:00
parent cec6c07f38
commit 80491aea4f

40
.github/workflows/release.yaml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Release
on:
push:
branches: [main]
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Build project
run: npm run build
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/$(basename ${{ github.repository }}):latest
docker build . --tag $IMAGE_NAME
docker push $IMAGE_NAME