|
1 | 1 | # Archive source code with third party library
|
2 | 2 |
|
3 |
| -name: Archive |
| 3 | +name: Archive Source Code |
4 | 4 |
|
5 |
| -# Controls when the action will run. Workflow runs when manually triggered using the UI |
6 |
| -# or API. |
7 | 5 | on:
|
8 | 6 | workflow_dispatch:
|
9 | 7 |
|
10 |
| -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
11 | 8 | jobs:
|
12 |
| - archive: |
| 9 | + archive-source-code: |
13 | 10 | runs-on: ubuntu-latest
|
14 | 11 | steps:
|
15 |
| - |
16 |
| - - name: download-v8-libs |
| 12 | + - name: Checkout code |
| 13 | + |
| 14 | + - name: Read Plugin Version |
| 15 | + run: | |
| 16 | + VERSION=`cat UnrealJS.uplugin | jq -r '.VersionName'` |
| 17 | + echo "UNREALJS_VERSION=v$VERSION" >> $GITHUB_ENV |
| 18 | + shell: bash |
| 19 | + - name: Download 3rd party library |
17 | 20 | run: |
|
18 | 21 | chmod +x ./install-v8-libs.sh
|
19 | 22 | ./install-v8-libs.sh
|
20 | 23 | shell: bash
|
21 |
| - - name: archive |
22 |
| - |
| 24 | + - name: Compress Source Code |
| 25 | + run: zip -r unrealjs-plugin-full.zip . -x ".git/*" ".github/*" "*.zip" |
| 26 | + - name: Create Release |
| 27 | + id: create_release |
| 28 | + uses: actions/create-release@v1 |
| 29 | + env: |
| 30 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
23 | 31 | with:
|
24 |
| - args: zip -qq -r source-code.zip . |
25 |
| - - name: upload |
26 |
| - |
| 32 | + tag_name: ${{ env.UNREALJS_VERSION }} |
| 33 | + release_name: Full Source Code of ${{ env.UNREALJS_VERSION }} |
| 34 | + draft: false |
| 35 | + prerelease: false |
| 36 | + - name: Upload Compressed Source Code |
| 37 | + id: upload-source-code |
| 38 | + uses: actions/upload-release-asset@v1 |
| 39 | + env: |
| 40 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
27 | 41 | with:
|
28 |
| - name: source-code.zip |
| 42 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 43 | + asset_path: ./unrealjs-plugin-full.zip |
| 44 | + asset_name: unrealjs-plugin-full.zip |
| 45 | + asset_content_type: application/zip |
0 commit comments