Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d90786286e | ||
|
|
0bf9a3c12b | ||
|
|
c1da26d973 | ||
|
|
2456bc4a3e | ||
|
|
1a46db3c5c | ||
|
|
f517a54f68 | ||
|
|
1ba58d6e9d | ||
|
|
c458a9f51c |
No files matched your search
@@ -0,0 +1,39 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
|
||||
# Superseding pushes shouldn't each wait for a full build on the shared
|
||||
# runner. Releases deliberately aren't covered — cancelling a publish
|
||||
# halfway is worse than running it twice.
|
||||
concurrency:
|
||||
group: ${{ gitea.workflow }}-${{ gitea.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: rocky-10
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# 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
|
||||
@@ -1,9 +1,9 @@
|
||||
name: Release
|
||||
|
||||
# v1.2.3 -> production build, release, publish to www.mtps.pl
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
tags: ['v*']
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -12,20 +12,41 @@ jobs:
|
||||
- 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: 22
|
||||
node-version: 24
|
||||
cache: pnpm
|
||||
|
||||
- name: Install dependencies and build
|
||||
run: |
|
||||
corepack enable
|
||||
corepack prepare pnpm@11.0.0 --activate
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm run build
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Type check
|
||||
run: pnpm check
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
- name: Create release archive
|
||||
run: tar -czf dist.tar.gz -C build .
|
||||
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
|
||||
@@ -34,4 +55,16 @@ jobs:
|
||||
server_url: ${{ gitea.server_url }}
|
||||
tag_name: ${{ gitea.ref_name }}
|
||||
name: ${{ gitea.ref_name }}
|
||||
files: dist.tar.gz
|
||||
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 }}
|
||||
+5
-3
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "homepage",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.3",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@11.28.2",
|
||||
"engines": {
|
||||
"node": ">=18.18.0",
|
||||
"pnpm": ">=11.0.0"
|
||||
@@ -26,7 +27,8 @@
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
"eject": "react-scripts eject",
|
||||
"check": "tsc --noEmit"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
@@ -46,4 +48,4 @@
|
||||
"last 1 safari version"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user