Skip to content

Update Readme & prepare new release (#86) #77

Update Readme & prepare new release (#86)

Update Readme & prepare new release (#86) #77

name: Build and Release
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
- push
- pull_request
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: Build all files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run tests
run: nix flake check -L
publish:
name: Publish
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
if: startsWith(github.ref, 'refs/tags/')
steps:
# only execute if a new release is created
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build .#documentation-artifacts
- uses: actions/checkout@v4
with:
repository: kai-tub/latex-beamer-pure-minimalistic.wiki
path: wiki
- run: |
echo "Copy documentation results to wiki"
install --mode=666 ./result/* wiki/
cd wiki
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "update wiki"
echo "annotate release if release triggered the workflow"
git tag --annotate --message "Release" ${{ github.ref_name }}
git push
- name: Create archives
# Add to release
- run: |
mkdir -p beamertheme-pure-minimalistic
install --mode=666 {*.sty,beamertheme-pure-minimalistic-demo.tex,./result/beamertheme-pure-minimalistic-demo.pdf,README.md,LICENSE,demo_bib.bib} beamertheme-pure-minimalistic/
cp -r logos beamertheme-pure-minimalistic/
zip -r beamertheme-pure-minimalistic.zip beamertheme-pure-minimalistic
tar cfvz beamertheme-pure-minimalistic.tar.gz beamertheme-pure-minimalistic
- name: Upload zip asset
uses: softprops/action-gh-release@v2
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ./beamertheme-pure-minimalistic.zip
asset_name: beamertheme-pure-minimalistic.zip
- name: Upload tar.gz asset
uses: softprops/action-gh-release@v2
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ./beamertheme-pure-minimalistic.tar.gz
asset_name: beamertheme-pure-minimalistic.tar.gz
- name: Upload beamertheme-pure-minimalistic-demo.pdf
uses: softprops/action-gh-release@v2
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: beamertheme-pure-minimalistic/beamertheme-pure-minimalistic-demo.pdf
asset_name: beamertheme-pure-minimalistic-demo.pdf