Files
webnews/.gitea/workflows/publish.yml
Sudo-Ivan 50399bcae2
All checks were successful
OSV-Scanner Scheduled Scan / scan-scheduled (push) Successful in 19s
CI / build-frontend (push) Successful in 51s
CI / build-backend (push) Successful in 28s
Update CI and publish workflows to use specific pnpm action version and add Android SDK setup
- Changed pnpm action setup to a specific commit version for consistency in CI and publish workflows.
- Added Android SDK setup step in the publish workflow to streamline Android development environment.
2025-12-27 12:32:36 -06:00

59 lines
1.6 KiB
YAML

name: Publish
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: pnpm
- name: Setup Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: '1.25.4'
- name: Setup Java
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: 'temurin'
java-version: '21'
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3
with:
log-accepted-android-sdk-licenses: false
- name: Install dependencies
run: bash scripts/publish_setup.sh
- name: Build and package
run: bash scripts/publish_build.sh
- name: Create release and upload packages
if: startsWith(gitea.ref, 'refs/tags/v')
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
REF_NAME: ${{ gitea.ref_name }}
REPO_OWNER: ${{ gitea.repository_owner }}
REPO_NAME: ${{ gitea.event.repository.name }}
SERVER_URL: ${{ gitea.server_url }}
run: bash scripts/publish.sh