Skip to content

Create release.yml

Create release.yml #1

Workflow file for this run

name: Release
on:
push:
#tags:
# - 'v*'
jobs:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: eltos/accelerated-jacow
path: accelerated-jacow
- uses: actions/checkout@v4
with:
repository: eltos/typst-packages
path: typst-packages
- name: Extract version
run: |
VERSION=$(awk -F'= *' '/^version/{gsub(/"/,"",$2);print $2}' accelerated-jacow/typst.toml)
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Copy & commit
run: |
cd typst-packages
git branch -D accelerated-jacow-$VERSION 2>/dev/null || true
git checkout -b accelerated-jacow-$VERSION
mkdir -p packages/preview/accelerated-jacow/$VERSION
rm -drf packages/preview/accelerated-jacow/$VERSION/*
cp -r ../accelerated-jacow/* packages/preview/accelerated-jacow/$VERSION/
ls -l packages/preview/accelerated-jacow/$VERSION/
git config user.name "Eltos"
git config user.email "[email protected]"
git add packages/preview/accelerated-jacow/$VERSION/
git commit -m "accelerated-jacow:$VERSION"
git push