bump version 0.8.7 #57
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
push: | |
branches: [ master, main ] | |
tags: [ 'v*' ] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: choco pack | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: nupkg | |
path: latexml.*.nupkg | |
test: | |
runs-on: windows-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: nupkg | |
- run: choco install --no-progress latexml -dv -s "'.;https://chocolatey.org/api/v2/'" | |
- run: choco install --no-progress wget unzip | |
- name: install miktexsetup | |
shell: cmd | |
run: | | |
wget https://miktex.org/download/win/miktexsetup-x64.zip | |
unzip miktexsetup-x64.zip | |
setlocal enableextensions | |
md C:\temp\miktex | |
.\miktexsetup_standalone.exe --quiet --local-package-repository=C:\temp\miktex --package-set=basic download | |
- name: test latexml available in PATH | |
run: | | |
$env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." | |
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" | |
Update-SessionEnvironment | |
Get-Command latexml | |
- name: test compilation | |
run: | | |
& latexml --dest=test.xml test.tex | |
if (!(Test-Path .\test.xml)) { exit 1 } | |
if (Select-String -Path .\test.xml -Pattern "ERROR") { exit 1 } | |
- run: choco uninstall latexml -y | |
publish: | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: windows-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: nupkg | |
- name: push to chocolatey | |
env: | |
CHOCO_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }} | |
run: | | |
$namespaces = @{nuspec = "http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd"} | |
$pkgVersion = Select-Xml -Path latexml.nuspec ` | |
-XPath "/nuspec:package/nuspec:metadata/nuspec:version/text()" ` | |
-Namespace $namespaces | Select-Object -Expand Node | Select-Object -Expand Data | |
choco apikey -key $Env:CHOCO_API_KEY -source https://chocolatey.org/ | |
choco push latexml.${pkgVersion}.nupkg -source https://chocolatey.org/ |