Skip to content

Commit 7967cf2

Browse files
authored
Create release.yml
1 parent 75b6334 commit 7967cf2

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
#tags:
6+
# - 'v*'
7+
8+
jobs:
9+
compile:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
repository: eltos/accelerated-jacow
15+
path: accelerated-jacow
16+
- uses: actions/checkout@v4
17+
with:
18+
repository: eltos/typst-packages
19+
path: typst-packages
20+
- name: Extract version
21+
run: |
22+
VERSION=$(awk -F'= *' '/^version/{gsub(/"/,"",$2);print $2}' accelerated-jacow/typst.toml)
23+
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
24+
- name: Copy & commit
25+
run: |
26+
cd typst-packages
27+
git branch -D accelerated-jacow-$VERSION 2>/dev/null || true
28+
git checkout -b accelerated-jacow-$VERSION
29+
mkdir -p packages/preview/accelerated-jacow/$VERSION
30+
rm -drf packages/preview/accelerated-jacow/$VERSION/*
31+
cp -r ../accelerated-jacow/* packages/preview/accelerated-jacow/$VERSION/
32+
ls -l packages/preview/accelerated-jacow/$VERSION/
33+
git config user.name "Eltos"
34+
git config user.email "[email protected]"
35+
git add packages/preview/accelerated-jacow/$VERSION/
36+
git commit -m "accelerated-jacow:$VERSION"
37+
git push

0 commit comments

Comments
 (0)