Skip to content

Backport theme updates from material-templates. #36

Backport theme updates from material-templates.

Backport theme updates from material-templates. #36

Workflow file for this run

name: Build sample material
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- name: Install tools
uses: taiki-e/install-action@v2
with:
tool: [email protected],[email protected],[email protected]
- name: Find slug name
run: |
slug=$(./describe.sh "${GITHUB_REF}")
echo "Building with slug '${slug}'"
echo "slug=${slug}" >> "${GITHUB_ENV}"
- name: Build the material
run: |
./build.sh
- name: Assemble Artifacts
run: |
echo "Making ./why-rust-${{ env.slug }}..."
mkdir -p ./why-rust-${{ env.slug }}
mv ./slides ./why-rust-${{ env.slug }}/slides
mv ./book ./why-rust-${{ env.slug }}/book
echo "Compressing ./why-rust-${{ env.slug }}.zip..."
zip -r ./why-rust-${{ env.slug }}.zip ./why-rust-${{ env.slug }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
if: ${{success()}}
with:
name: Artifacts
if-no-files-found: error
path: |
./why-rust-*/
- name: Create and Upload Release
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
id: create_release
uses: ncipollo/release-action@v1
with:
artifacts: ./why-rust-${{ env.slug }}.zip