65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
name: ReleaseApp (JS finder + download)
|
|
|
|
on:
|
|
workflow_dispatch: {}
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GITEA_BASE_URL: https://code.bim-it.pl
|
|
OWNER: mz
|
|
REPO: DiunaBI
|
|
# Comma-separated artifact names that must exist
|
|
REQUIRED_ARTIFACTS: frontend,webapi
|
|
# How many recent successful runs to scan
|
|
SCAN_LIMIT: "100"
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://github.com/actions/checkout@v4
|
|
|
|
- name: Use Node.js 20
|
|
uses: https://github.com/actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install unzip (for extraction)
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y unzip
|
|
|
|
- name: Resolve latest run that exposes required artifacts
|
|
id: resolve
|
|
env:
|
|
GITEA_PAT: ${{ secrets.GITEA_PAT }}
|
|
run: |
|
|
node .gitea/scripts/getLatestRunWithArtifacts.js
|
|
echo "Resolved run_id: $(cat .gitea/.cache/run_id)"
|
|
|
|
- name: Download frontend artifact
|
|
env:
|
|
GITEA_PAT: ${{ secrets.GITEA_PAT }}
|
|
ARTIFACT_NAME: frontend
|
|
RUN_ID: ${{ steps.resolve.outputs.run_id }}
|
|
OUTPUT_DIR: artifacts/frontend
|
|
run: |
|
|
node .gitea/scripts/downloadArtifactByName.js
|
|
|
|
- name: Download webapi artifact
|
|
env:
|
|
GITEA_PAT: ${{ secrets.GITEA_PAT }}
|
|
ARTIFACT_NAME: webapi
|
|
RUN_ID: ${{ steps.resolve.outputs.run_id }}
|
|
OUTPUT_DIR: artifacts/webapi
|
|
run: |
|
|
node .gitea/scripts/downloadArtifactByName.js
|
|
|
|
- name: Show artifact structure
|
|
run: |
|
|
echo "::group::frontend"
|
|
ls -laR artifacts/frontend || true
|
|
echo "::endgroup::"
|
|
echo "::group::webapi"
|
|
ls -laR artifacts/webapi || true
|
|
echo "::endgroup::" |