Skip to content

Test core18

Test core18 #100

Workflow file for this run

name: build-and-release
on:
push:
branches: [ master ]
tags: [ v* ]
pull_request:
workflow_dispatch:
jobs:
build:
name: Build LaTeXML snap
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: snapcraft
uses: snapcore/action-build@v1
with:
path: snap
- uses: actions/upload-artifact@v3
with:
name: latexml-snap
path: ${{ steps.snapcraft.outputs.snap }}
retention-days: 5
test:
name: Test LaTeXML snap
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Snapcraft setup
run: |
sudo apt update
sudo apt install -y snapd
- uses: actions/download-artifact@v3
with:
name: latexml-snap
path: ./snap
- name: Install snap
run: |
sudo snap install snap/*.snap --devmode
- name: Test snap
run: |
latexml --VERSION || echo "Expected exit code 1"
latexml --dest=test.xml test.tex
release-stable:
if: startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, 'pre')
name: Release edge snap
needs: test
runs-on: ubuntu-latest
container:
image: snapcore/snapcraft:stable
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: latexml-snap
path: ./snap
- name: Push to snapcraft.io
env:
SNAPCRAFT_TOKEN: ${{ secrets.METANORMA_SNAPCRAFT_TOKEN }}
run: |
echo "${SNAPCRAFT_TOKEN}" > .snapcraft_token
snapcraft login --with .snapcraft_token
snapcraft push --release=stable snap/*.snap
release-edge:
if: github.ref == 'refs/heads/master'
name: Release edge snap
needs: test
runs-on: ubuntu-latest
container:
image: snapcore/snapcraft:stable
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: latexml-snap
path: ./snap
- name: Push to snapcraft.io
env:
SNAPCRAFT_TOKEN: ${{ secrets.METANORMA_SNAPCRAFT_TOKEN }}
run: |
echo "${SNAPCRAFT_TOKEN}" > .snapcraft_token
snapcraft login --with .snapcraft_token
snapcraft push --release=edge snap/*.snap
release-candidate:
if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, 'pre')
name: Release stable snap
needs: test
runs-on: ubuntu-latest
container:
image: snapcore/snapcraft:stable
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: latexml-snap
path: ./snap
- name: Push to snapcraft.io
env:
SNAPCRAFT_TOKEN: ${{ secrets.METANORMA_SNAPCRAFT_TOKEN }}
run: |
echo "${SNAPCRAFT_TOKEN}" > .snapcraft_token
snapcraft login --with .snapcraft_token
snapcraft push --release=candidate snap/*.snap