Skip to content

Add asset label

Add asset label #10

Workflow file for this run

name: 'Build Datasheet'
on:
push:
branches:
- "*"
paths:
- 'datasheet/*'
- '.github/workflows/datasheet.yml'
# Ignore the push event when creating tags
tags-ignore:
- '[0-9]+.[0-9]+.[0-9]+'
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: wtfjoke/setup-tectonic@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Tectonic
run: tectonic datasheet/datasheet.tex
- name: Upload PDF as artifact
if: github.event.action != 'published'
uses: actions/upload-artifact@v3
with:
name: datasheet
path: datasheet/datasheet.pdf
- name: Append PDF as an asset
if: github.event.action == 'published'
run: gh release upload ${{ github.ref_name }} datasheet/datasheet.pdf#'Device datasheet'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash