Skip to content

Update manually_specified.yaml #347

Update manually_specified.yaml

Update manually_specified.yaml #347

name: Build Calendars
on:
pull_request:
branches: [ "main" ]
paths:
- 'manually_specified.yaml'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUST_LOG: trace
jobs:
build-calendars:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Cargo run
uses: actions-rs/cargo@v1
with:
command: run
# Don't actually compile the calendars, only check
# manually_specified.yaml for conflicts & errors
args: --release -- --only-check-for-overlaps=true
- name: Update draft release with build artefacts
uses: beyarkay/update-existing-release@master
continue-on-error: true # this step fails on PRs originating from a FORK
with:
token: ${{ secrets.GH_ACTIONS_PAT || github.token }}
release: Draft release with build artefacts
updateTag: true
tag: builds
replace: true
files: calendars/calendar_preview.png
body: |
This release contains build artefacts. If you want to add load
shedding to your calendar, click
[here](https://github.com/beyarkay/eskom-calendar/releases/tag/latest).