Skip to content

Commit bf0a793

Browse files
committed
Update archive.yml
1 parent 6719116 commit bf0a793

File tree

1 file changed

+30
-13
lines changed

1 file changed

+30
-13
lines changed

.github/workflows/archive.yml

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,45 @@
11
# Archive source code with third party library
22

3-
name: Archive
3+
name: Archive Source Code
44

5-
# Controls when the action will run. Workflow runs when manually triggered using the UI
6-
# or API.
75
on:
86
workflow_dispatch:
97

10-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
118
jobs:
12-
archive:
9+
archive-source-code:
1310
runs-on: ubuntu-latest
1411
steps:
15-
- uses: actions/[email protected]
16-
- name: download-v8-libs
12+
- name: Checkout code
13+
uses: actions/[email protected]
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
1720
run: |
1821
chmod +x ./install-v8-libs.sh
1922
./install-v8-libs.sh
2023
shell: bash
21-
- name: archive
22-
uses: montudor/[email protected]
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 }}
2331
with:
24-
args: zip -qq -r source-code.zip .
25-
- name: upload
26-
uses: actions/[email protected]
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 }}
2741
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

Comments
 (0)