Files
Mateusz PstruchaandClaude Opus 5.5 0bf9a3c12b
CI / build (pull_request) Successful in 30s
🚀 publish straight to the bucket
The release builds and uploads with ygg/actions/static-publish, instead of
deploying static-server through kara.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:13:03 +01:00

71 lines
2.0 KiB
YAML

name: Release
# v1.2.3 -> production build, release, publish to www.mtps.pl
on:
push:
tags: ['v*']
jobs:
release:
runs-on: rocky-10
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Derive version
id: meta
run: |
VERSION="${GITHUB_REF_NAME#v}"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "$VERSION"
# Version comes from the packageManager field in package.json.
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Type check
run: pnpm check
- name: Build
run: pnpm build
- name: Create release archive
env:
VERSION: ${{ steps.meta.outputs.version }}
run: |
NAME="${{ gitea.event.repository.name }}-${VERSION}.tgz"
# Archive the *contents* of build/ rather than build/ itself, so it
# untars straight into a web root.
tar -czf "$NAME" -C build .
sha256sum "$NAME" > "$NAME.sha256"
- name: Create release
uses: akkuman/gitea-release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
server_url: ${{ gitea.server_url }}
tag_name: ${{ gitea.ref_name }}
name: ${{ gitea.ref_name }}
files: |-
${{ gitea.event.repository.name }}-*.tgz
${{ gitea.event.repository.name }}-*.tgz.sha256
# Straight to the bucket, with a key that only reaches it. The bucket and
# the nginx site come from deployments/homepage.yml in ygg/deployments.
- name: Publish
uses: https://git.app.ygg/ygg/actions/static-publish@v2
with:
path: build
bucket: www.mtps.pl
access-key-id: ${{ secrets.STATIC_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.STATIC_SECRET_ACCESS_KEY }}