WIP: Build & Release
This commit is contained in:
21
.github/workflows/release-morska.yml
vendored
21
.github/workflows/release-morska.yml
vendored
@@ -17,9 +17,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Assign run ID if provided
|
||||
if: ${{ github.event.inputs.job_id != '' }}
|
||||
run: echo "job_id=${{ github.event.inputs.job_id }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Get last build ID
|
||||
id: get-build-id
|
||||
if: ${{ github.event.inputs.job_id == '' }}
|
||||
@@ -29,6 +31,7 @@ jobs:
|
||||
const script = require('./.github/workflows/buildScripts/getLastBuildId.js');
|
||||
const jobId = await script({github, context});
|
||||
core.setOutput("job_id", jobId);
|
||||
|
||||
- name: Set job_id
|
||||
if: ${{ github.event.inputs.job_id == '' }}
|
||||
run: echo "job_id=${{ steps.get-build-id.outputs.job_id }}" >> $GITHUB_ENV
|
||||
@@ -38,20 +41,21 @@ jobs:
|
||||
echo "Error: job_id is empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Download frontend artifacts
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/workflows/buildScripts/downloadArtifacts.js');
|
||||
await script({github, context, core, jobId: ${{env.job_id}}, name: 'frontend'});
|
||||
|
||||
- name: Download backend artifacts
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/workflows/buildScripts/downloadArtifacts.js');
|
||||
await script({github, context, core, jobId: ${{env.job_id}}, name: 'webapi'});
|
||||
- name: List artifacts
|
||||
run: ls -laR ./${{env.job_id}}
|
||||
|
||||
- name: Tokenize
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
@@ -61,3 +65,16 @@ jobs:
|
||||
script: |
|
||||
const script = require('./.github/workflows/buildScripts/replaceTokens.js');
|
||||
await script({github, context, core, jobId: ${{env.job_id}} });
|
||||
|
||||
- name: Archive frontend artifacts
|
||||
run: |
|
||||
cd ${{env.job_id}}/frontend
|
||||
zip -r ../morska-frontend.zip .
|
||||
|
||||
- name: Archive backend artifacts
|
||||
run: |
|
||||
cd ${{env.job_id}}/webapi
|
||||
zip -r ../morska-webapi.zip .
|
||||
|
||||
- name: List artifacts
|
||||
run: ls -la .
|
||||
|
||||
Reference in New Issue
Block a user