WIP: Build & Release

This commit is contained in:
Michał Zieliński
2025-02-12 15:52:51 +01:00
parent 33d57ac652
commit 0760f1764f
2 changed files with 13 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
module.exports = async ({ github, context, core, jobId }) => { module.exports = async ({ github, context, core, jobId }) => {
const files = require('fs').readdirSync(`./${jobId}/frontend`).filter(file => file.endsWith('.js'));
console.log(files);
}
function getValue() {
return 'TEST';
} }

View File

@@ -33,14 +33,14 @@ jobs:
if: ${{ github.event.inputs.job_id == '' }} if: ${{ github.event.inputs.job_id == '' }}
run: echo "job_id=${{ steps.get-build-id.outputs.job_id }}" >> $GITHUB_ENV run: echo "job_id=${{ steps.get-build-id.outputs.job_id }}" >> $GITHUB_ENV
- name: Download frontend artifacts - name: Download frontend artifacts
if: ${{ github.event.inputs.job_id == '' }} if: ${{ env.job_id == '' }}
uses: actions/github-script@v6 uses: actions/github-script@v6
with: with:
script: | script: |
const script = require('./.github/workflows/buildScripts/downloadArtifacts.js'); const script = require('./.github/workflows/buildScripts/downloadArtifacts.js');
await script({github, context, core, jobId: ${{env.job_id}}, name: 'frontend'}); await script({github, context, core, jobId: ${{env.job_id}}, name: 'frontend'});
- name: Download backend artifacts - name: Download backend artifacts
if: ${{ github.event.inputs.job_id == '' }} if: ${{ env.job_id == '' }}
uses: actions/github-script@v6 uses: actions/github-script@v6
with: with:
script: | script: |
@@ -48,3 +48,9 @@ jobs:
await script({github, context, core, jobId: ${{env.job_id}}, name: 'webapi'}); await script({github, context, core, jobId: ${{env.job_id}}, name: 'webapi'});
- name: List artifacts - name: List artifacts
run: ls -la ./${{env.job_id}} run: ls -la ./${{env.job_id}}
- name: Tokenize
uses: actions/github-script@v6
with:
script: |
const script = require('./.github/workflows/buildScripts/replaceTokens.js');
await script({github, context, core, jobId: ${{env.job_id}} });