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

Commit c7df743

Browse files
committed
Add a gh workflow to create a packed version of the library
1 parent aa5854c commit c7df743

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/pack.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Pack cc-runtime
2+
3+
on: [push]
4+
5+
jobs:
6+
pack:
7+
name: Pack cc-runtime
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: '0'
15+
16+
- name: Pack cc-runtime
17+
run: |
18+
set -e
19+
cat assembly.h int_util.h int_endianness.h int_types.h int_lib.h *.inc *.c > /tmp/cc-runtime.c
20+
sed -i '/#include/d' /tmp/cc-runtime.c
21+
22+
- name: Push packed cc-runtime
23+
run: |
24+
set -ex
25+
git config user.name 'mintsuki'
26+
git config user.email '[email protected]'
27+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/osdev0/cc-runtime.git
28+
git fetch --all
29+
git checkout packed || git checkout --orphan packed
30+
rm -rf .github *.c *.h *.inc
31+
mv /tmp/cc-runtime.c ./
32+
git add -f .
33+
git commit -m "Push packed cc-runtime.c"
34+
git push origin packed

0 commit comments

Comments
 (0)