Skip to content

Commit 17cdaf5

Browse files
committed
tooling: upload source artifact
1 parent b96f556 commit 17cdaf5

1 file changed

Lines changed: 9 additions & 17 deletions

File tree

‎.github/workflows/export-source.yml‎

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,18 @@ on:
66
- loop/precision-bug-hunting-protocol
77

88
permissions:
9-
contents: write
9+
contents: read
1010

1111
jobs:
1212
export:
13-
if: "github.event.head_commit.message == 'tooling: export wrapped source snapshot v2'"
13+
if: "github.event.head_commit.message == 'tooling: upload source artifact'"
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v7
17-
with:
18-
fetch-depth: 0
1917

2018
- name: Build compact source archive
2119
run: |
2220
set -euo pipefail
23-
rm -f .loop/source-snapshot.tgz.b64 .loop/source-snapshot.part-* .loop/source-snapshot.parts
2421
tar \
2522
--exclude=.git \
2623
--exclude=node_modules \
@@ -32,16 +29,11 @@ jobs:
3229
--exclude=.loop/source-snapshot.parts \
3330
--exclude=.loop/source-snapshot.sha256 \
3431
-czf /tmp/bug-hunter-source.tgz .
35-
base64 -w 2000 /tmp/bug-hunter-source.tgz > /tmp/bug-hunter-source.tgz.b64
36-
split -l 10 -d -a 3 /tmp/bug-hunter-source.tgz.b64 .loop/source-snapshot.part-
37-
find .loop -maxdepth 1 -type f -name 'source-snapshot.part-*' -printf '%f\n' | sort > .loop/source-snapshot.parts
38-
sha256sum /tmp/bug-hunter-source.tgz | awk '{print $1}' > .loop/source-snapshot.sha256
3932
40-
- name: Commit transport snapshot
41-
run: |
42-
set -euo pipefail
43-
git config user.name 'github-actions[bot]'
44-
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
45-
git add -- .loop/source-snapshot.sha256 .loop/source-snapshot.parts .loop/source-snapshot.part-*
46-
git commit -m 'tooling: wrapped source snapshot'
47-
git push origin HEAD:loop/precision-bug-hunting-protocol
33+
- name: Upload source archive
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: bug-hunter-source-snapshot
37+
path: /tmp/bug-hunter-source.tgz
38+
if-no-files-found: error
39+
retention-days: 1

0 commit comments

Comments
 (0)