Skip to content

SM#5 2023-Add Trustee Committee Treasurers #94

SM#5 2023-Add Trustee Committee Treasurers

SM#5 2023-Add Trustee Committee Treasurers #94

Workflow file for this run

name: Build and maybe release
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Glob match swedish files
uses: tj-actions/[email protected]
id: glob_swe
with:
files: |
stadgar/swe/**.md
pm/swe/**.md
other_documents/swe/**.md
- name: Glob match english files
uses: tj-actions/[email protected]
id: glob_eng
with:
files: |
stadgar/eng/**.md
pm/eng/**.md
other_documents/eng/**.md
- name: Get current datetime
id: date_hash
shell: bash
run: |
echo "::set-output name=date::$(TZ='Europe/Stockholm' date +%Y%m%d-%H%M%S)"
- name: Create output directory
shell: bash
run: mkdir output
- name: Merge Swedish markdown
shell: bash
run: sed -s '$a\\n\\newpage\n' ${{ steps.glob_swe.outputs.paths }} > swe.md
- name: Merge English markdown
shell: bash
run: sed -s '$a\\n\\newpage\n' ${{ steps.glob_eng.outputs.paths }} > eng.md
- name: Build Swedish pdf
uses: docker://pandoc/latex:2.9
with:
args: --output=output/styrdokument_in_swe_${{ steps.date_hash.outputs.date }}.pdf swe.md
- name: Build English pdf
uses: docker://pandoc/latex:2.9
with:
args: --output=output/styrdokument_in_eng_${{ steps.date_hash.outputs.date }}.pdf eng.md
- name: Create Zip
run: |
zip --junk-paths all_documents_${{ steps.date_hash.outputs.date }}.zip output/*
- name: Release
uses: softprops/action-gh-release@v1
if: github.ref == 'refs/heads/main' # Don't release on PR
with:
tag_name: ${{ steps.date_hash.outputs.date }}
name: Release ${{ steps.date_hash.outputs.date }}
files: |
all_documents_${{ steps.date_hash.outputs.date }}.zip
output/*.pdf