mirror of
https://github.com/latex-lsp/texlab.git
synced 2025-12-23 09:19:21 +00:00
60 lines
2 KiB
YAML
60 lines
2 KiB
YAML
name: Deployment
|
|
on:
|
|
release:
|
|
types: [published]
|
|
jobs:
|
|
github:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-18.04
|
|
archive_file: texlab-x86_64-linux.tar.gz
|
|
archive_cmd: tar -czvf {0} -C target/release texlab
|
|
archive_type: application/gzip
|
|
- os: windows-latest
|
|
archive_file: texlab-x86_64-windows.zip
|
|
archive_cmd: Compress-Archive target/release/texlab.exe {0}
|
|
archive_type: application/zip
|
|
- os: macos-latest
|
|
archive_file: texlab-x86_64-macos.tar.gz
|
|
archive_cmd: brew install gnu-tar; gtar -czvf {0} -C target/release texlab
|
|
archive_type: application/gzip
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --release --locked
|
|
- run: ${{ format(matrix.archive_cmd, matrix.archive_file) }}
|
|
name: "Compress release binary"
|
|
- uses: actions/upload-release-asset@v1
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./${{ matrix.archive_file }}
|
|
asset_name: ${{ matrix.archive_file }}
|
|
asset_content_type: ${{ matrix.archive_type }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
ctan:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: git archive --prefix=texlab/ -o texlab.zip HEAD
|
|
- id: get-version
|
|
run: |
|
|
RELEASE_TAG=${{ github.event.release.tag_name }}
|
|
echo "::set-output name=version::${RELEASE_TAG:1}"
|
|
- uses: paolobrasolin/ctan-submit-action@v1
|
|
with:
|
|
action: upload
|
|
file_path: texlab.zip
|
|
fields: |
|
|
pkg: texlab
|
|
version: ${{ steps.get-version.outputs.version }}
|
|
uploader: Eric Förster
|
|
email: eric.foerster@outlook.com
|
|
update: 'true'
|