Files
backend/.gitea/workflows/publish.yaml
T
TakahashiNguyen a97e9ade6e
Release package / release (push) Has been cancelled
fix: Resolve runtime issue with native build (#24)
Co-authored-by: TakahashiNg <83152264+TakahashiNguyen@users.noreply.github.com>
Reviewed-on: #24
2026-04-17 05:39:21 +00:00

77 lines
2.0 KiB
YAML

name: Release package
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: gerlero/apt-install@v1
with:
packages: openjdk-25-jdk-headless docker.io
- name: Setup SSH Key
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -t ed25519 vps.demonkernel.io.vn >> ~/.ssh/known_hosts
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: vps.demonkernel.io.vn
username: ${{ github.actor }}
password: ${{ secrets.ACCESS_TOKEN }}
- uses: pnpm/action-setup@v3
with:
version: latest
run_install: false
cache: true
- name: Run Semantic Release
env:
GITEA_USER: ${{ github.actor }}
GITEA_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
pnpm i
pnpm release
pnpm format
- name: Commit & Push Changes
run: |
if [ -n "$(git status --porcelain)" ]&& [ "${{ github.ref_name }}" = "main" ]; then
git config --global user.name "gitea-actions"
git config --global user.email "actions-user@noreply.git.demonkernel.io.vn"
REPO_NAME="${{ gitea.repository }}"
git remote set-url origin ssh://git@vps.demonkernel.io.vn/${REPO_NAME}.git
git rm -r --cached .
git add .
git commit -m "chore: release [ci skip]"
git push
fi