forked from p2pderivatives/cfd-js-wasm
-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (54 loc) · 1.66 KB
/
create_release-and-upload.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: create-release-upload
on:
push:
tags:
- 'v*'
jobs:
create-releases:
name: create-releases
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: check package.json version
env:
version: ${{ steps.get_version.outputs.VERSION }}
run: node ./tools/checker.js version ${version}
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ steps.get_version.outputs.VERSION }}
body: |
Changes in this Release
- First Change
- Second Change
prerelease: true
continue-on-error: true
- name: Get the asset name
id: asset_name
run: |
echo "TAR_NAME=cfdwasm-${{ steps.get_version.outputs.VERSION }}-0.tar" >> $GITHUB_OUTPUT
echo "ZIP_NAME=cfdwasm-${{ steps.get_version.outputs.VERSION }}-0.zip" >> $GITHUB_OUTPUT
- name: create archive file
run: |
mkdir work
cp -rp dist/* work
cp cfdjs_wasm_jsonapi.js work
cd work
zip -r ../${{ steps.asset_name.outputs.ZIP_NAME }} .
tar -cvf ../${{ steps.asset_name.outputs.TAR_NAME }} *
cd ..
gzip ${{ steps.asset_name.outputs.TAR_NAME }}
echo "---- dump file ----"
ls -l
- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v1
with:
files: |
${{ steps.asset_name.outputs.TAR_NAME }}.gz
${{ steps.asset_name.outputs.ZIP_NAME }}