Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 8dbc92e

Browse files
committed
chore: test release draft
1 parent e416c6c commit 8dbc92e

File tree

2 files changed

+39
-4
lines changed

2 files changed

+39
-4
lines changed

.github/workflows/cortex-js-artifact.yml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,31 @@ on:
77
workflow_dispatch:
88

99
jobs:
10+
create-draft-release:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
upload_url: ${{ steps.create_release.outputs.upload_url }}
14+
version: ${{ steps.get_version.outputs.version }}
15+
permissions:
16+
contents: write
17+
steps:
18+
- name: Extract tag name without v prefix
19+
id: get_version
20+
run: |
21+
echo "VERSION=0.4.17" >> $GITHUB_ENV && echo "::set-output name=version::0.4.17
22+
- name: Create Draft Release
23+
id: create_release
24+
uses: softprops/action-gh-release@v2
25+
with:
26+
tag_name: v0.4.17
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
name: "${{ env.VERSION }}"
29+
draft: true
30+
prerelease: false
31+
1032
build-cortex-single-binary:
1133
runs-on: ${{ matrix.runs-on }}
12-
needs: []
34+
needs: [create-draft-release]
1335
timeout-minutes: 20
1436
strategy:
1537
fail-fast: false
@@ -51,9 +73,9 @@ jobs:
5173
with:
5274
node-version: "20.x"
5375
registry-url: "https://registry.npmjs.org"
54-
76+
5577
- run: npm install -g yarn
56-
78+
5779
- run: yarn install && yarn build && yarn build:binary
5880
working-directory: ./cortex-js
5981

@@ -80,11 +102,20 @@ jobs:
80102
run: |
81103
cd cortex-js
82104
make postbundle
83-
105+
84106
- name: Upload Artifact
85107
uses: actions/upload-artifact@v2
86108
with:
87109
name: cortex-${{ matrix.os }}-${{ matrix.name }}
88110
path: |
89111
./cortex-js/cortex
90112
./cortex-js/cortex.exe
113+
114+
- uses: actions/upload-release-asset@v1.0.1
115+
env:
116+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117+
with:
118+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
119+
asset_path: ./cortex-js/cortex.tar.gz
120+
asset_name: cortex-${{ needs.create-draft-release.outputs.version }}-${{ matrix.name }}-${{ matrix.os }}.tar.gz
121+
asset_content_type: application/gzip

cortex-js/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ ifeq ($(RUN_TESTS),false)
1212
@exit 0
1313
endif
1414
ifeq ($(OS),Windows_NT)
15+
@powershell -Command "7z a -ttar temp.tar cortex.exe; 7z a -tgzip cortex.tar.gz temp.tar;"
1516
else ifeq ($(shell uname -s),Linux)
1617
@chmod +x cortex;
18+
tar -czvf cortex.tar.gz cortex;
1719
else
1820
@chmod +x cortex;
21+
tar -czvf cortex.tar.gz cortex;
1922
endif
2023

24+
2125
codesign:
2226
ifeq ($(CODE_SIGN),false)
2327
@echo "Skipping Code Sign"

0 commit comments

Comments
 (0)