b34b0dd7d6
Validators (Pushes and Pull Requests) / UI & Storage Validation (pull_request) Failing after 12s
Validators (Pushes and Pull Requests) / Database & Schema Validation (pull_request) Successful in 13s
Validators (Pushes and Pull Requests) / Core Validators & Database Setup (pull_request) Failing after 28s
Validators (Pushes and Pull Requests) / WBS & Audit Validations (pull_request) Has been skipped
Validators (Pushes and Pull Requests) / .NET Contracts (pull_request) Has been skipped
Validators (Pushes and Pull Requests) / Calibration & Performance (pull_request) Has been skipped
Validators (Pushes and Pull Requests) / Operational Report & Decision Packet (pull_request) Has been skipped
Validators (Pushes and Pull Requests) / CI Workflow Lint (pull_request) Failing after 10s
Validators (Pushes and Pull Requests) / Security & Secrets (pull_request) Successful in 12s
Validators (Pushes and Pull Requests) / Notify PR Results (pull_request) Successful in 2s
Frontend CI Pipeline / ci-frontend-8-steps (pull_request) Failing after 2m50s
89 lines
3.2 KiB
YAML
89 lines
3.2 KiB
YAML
name: Prepare Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Release version (e.g., v1.0.0)'
|
|
required: true
|
|
default: 'v1.0.0'
|
|
|
|
jobs:
|
|
build-and-release:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm install --legacy-peer-deps
|
|
|
|
- name: Build production bundle
|
|
run: npm run build
|
|
|
|
- name: Generate checksums
|
|
run: |
|
|
cd dist
|
|
find . -type f -exec sha256sum {} \; > ../CHECKSUMS.txt
|
|
cd ..
|
|
|
|
- name: Create release artifact
|
|
run: |
|
|
tar -czf oms-wms-erp-${{ github.event.inputs.version }}.tar.gz dist/ package.json package-lock.json .env.example CHECKSUMS.txt
|
|
sha256sum oms-wms-erp-${{ github.event.inputs.version }}.tar.gz > RELEASE_CHECKSUM.txt
|
|
|
|
- name: Create git tag
|
|
run: |
|
|
git config --local user.email "ci@example.com"
|
|
git config --local user.name "Gitea CI"
|
|
git tag -a ${{ github.event.inputs.version }} -m "Release ${{ github.event.inputs.version }}"
|
|
git push origin ${{ github.event.inputs.version }}
|
|
|
|
- name: Create Gitea Release
|
|
run: |
|
|
curl -X POST \
|
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"tag_name": "${{ github.event.inputs.version }}",
|
|
"target_commitish": "main",
|
|
"name": "Release ${{ github.event.inputs.version }}",
|
|
"body": "OMS·WMS·ERP Production Release",
|
|
"draft": false,
|
|
"prerelease": false
|
|
}' \
|
|
${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases
|
|
|
|
- name: Upload artifact to release
|
|
run: |
|
|
RELEASE_ID=$(curl -s -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
|
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.inputs.version }}" | jq '.id')
|
|
|
|
curl -X POST \
|
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
|
-F "attachment=@oms-wms-erp-${{ github.event.inputs.version }}.tar.gz" \
|
|
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/$RELEASE_ID/assets"
|
|
|
|
- name: Upload checksum
|
|
run: |
|
|
RELEASE_ID=$(curl -s -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
|
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/tags/${{ github.event.inputs.version }}" | jq '.id')
|
|
|
|
curl -X POST \
|
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
|
-F "attachment=@RELEASE_CHECKSUM.txt" \
|
|
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/$RELEASE_ID/assets"
|
|
|
|
- name: Notify release ready
|
|
run: |
|
|
echo "✅ Release ${{ github.event.inputs.version }} prepared successfully"
|
|
echo "Artifact: oms-wms-erp-${{ github.event.inputs.version }}.tar.gz"
|
|
echo "Ready for deployment via deploy-prod.yml workflow"
|